user6191179
user6191179

Reputation:

Facet wrap for many facets in ggplot2

I'm trying to draw individual plots for many (100+) cases, but facet_wrap squeezes them together to an extent where they are unreadable (see image). How do I adjust facet_wrap to view many plots (perhaps by scrolling down the output, since they won't fit on one screen)? There are enough cases such that full-screen doesn't help. Adjusting the "ncol" argument in facet_wrap doesn't seem to change much either.

m <- ggplot(data, aes(x = time, y = perf))
m + geom_line() + facet_wrap(~ subject)

facet_wrap output

Upvotes: 1

Views: 2094

Answers (1)

Feng
Feng

Reputation: 613

The plot will fit into the plot region in Rstudio. But you can save it to disk to make a large picture so that you can scroll. Try ggsave:

ggsave('Mydata.jpeg1', width =4, height = 400, units='cm)

Upvotes: 1

Related Questions