From 322e3981e532bc46ba9103cdd4357ab51204ac77 Mon Sep 17 00:00:00 2001 From: hadley Date: Wed, 17 Aug 2016 16:33:34 -0500 Subject: [PATCH] Add naming advice from @jennybc --- communicate-plots.Rmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/communicate-plots.Rmd b/communicate-plots.Rmd index 9ab8860..3e5af7e 100644 --- a/communicate-plots.Rmd +++ b/communicate-plots.Rmd @@ -564,6 +564,8 @@ To add a caption to the plot, use `fig.cap`. In RMarkdown this will change the f If you're producing pdf output, the default graphics type is PDF. This a good default because PDFs are high quality vector graphics. However, they can produce very large and slow plots if you are displaying thousands of points. In that case, set `dev = "png"` to force the use of PNGs. They are slightly lower quality, but will be much more compact. +It's a good idea to give figure producing chunks names, even if you don't routinely label other chunks. The chunk label is used to generate the file name of the graphic on disk, so naming your chunks makes much easier to pick out plots and reuse in other circumstances (i.e. if you want to quickly drop a single plot into an email or a tweet). + ## Learning more The absolute best place to learn more is the ggplot2 book: [_ggplot2: Elegant graphics for data analysis_](https://amzn.com/331924275X). It goes into much more depth about the underlying theory, and has many more examples of how to combine the individual pieces to solve practical problems. Unfortunately the book is not available online for free, although can find the source code at .