Skip to content

Commit 07e95cc

Browse files
committed
Added a structure plot to newsgroups_annotate.R.
1 parent fc9cffc commit 07e95cc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

analysis/newsgroups_annotate.R

+8
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ library(cowplot)
66
load("../data/newsgroups.RData")
77
load("../output/newsgroups_factors.RData")
88
set.seed(1)
9+
L <- poisson2multinom(pnmf)$L
10+
newsgroups_topics <- paste0("k",c(1:3,5:10))
11+
other_topics <- paste0("k",c(2,4))
12+
p1 <- structure_plot(L,grouping = topics,gap = 10,topics = newsgroups_topics) +
13+
labs(title = "newsgroups topics")
14+
p2 <- structure_plot(L,grouping = topics,gap = 10,topics = other_topics) +
15+
labs(title = "other topics")
16+
print(plot_grid(p1,p2,nrow = 2,ncol = 1))

0 commit comments

Comments
 (0)