This is a pretty effective guide for the custom features that ggplot2 excels at, namely faceting. That being said, optimizing the chart requires a few more steps in each case, especially when working with real world data.<p>For those who want a step-by-step guide on plotting with ggplot2, I wrote a tutorial that has been well-liked with an emphasis on making pretty charts: <a href="http://minimaxir.com/2015/02/ggplot-tutorial/" rel="nofollow">http://minimaxir.com/2015/02/ggplot-tutorial/</a><p>Yesterday, I also pushed a screencast working explicitly with R and ggplot2, with an emphasis on processing/organizing data for charting in ggplot2: <a href="http://minimaxir.com/2015/12/lets-code-1/" rel="nofollow">http://minimaxir.com/2015/12/lets-code-1/</a><p>TL;DR R/ggplot2 can be <i>very</i> fussy, but when it isn't, it's magical.
It seems, as long as "Any plot" means either a scatter, or bar chart (not even a continuous histogram).<p>Also:<p>"There are 3 ways to change the X and Y axis limits.
....Warning: Items 2 and 3 will delete the datapoints that lie outisde the limit from the data itself. So, if you add any smoothing line line and such, the outcome will be distorted"<p>So, is this a graphics module, or a fitting module, or a data manipulation module? It seems to do all three, depending on which functions you use to "Change the axis limits".<p>Edit: Probably the best "How to do everything" page I've seen is for python's matplotlib's gallery page: <a href="http://matplotlib.org/gallery.html" rel="nofollow">http://matplotlib.org/gallery.html</a> - there is rarely not an example showing exactly what I want to do.
It's not mentioned in this guide, but Hadley Wickham's tidyr is a more streamlined version of the reshape2 package for fitting your data into a "tidy" format necessary for ideal faceting.