简体   繁体   中英

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

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM