An Introduction on How to Make Beautiful Charts with R and ggplot2
minimaxir.com
minimaxir.com
One thing I haven't quite figured out with ggplot2 is how to keep the text size constant in publications across figures. If you look at professionally typeset books, you'll see that the figure text (say the labels in a chart) is the same as the text of the article itself. Even this article suffers from the problem (but obviously, that's because the text is in a PNG so it can't scale with the article text).
The only workaround I have is to manually set the width of the figure before exporting, but this is fairly inflexible. Perhaps tikz output is another option, but my understanding (possibly incorrect) is that it isn't maintained anymore.
Can anyone recommend a good workflow for charts in R and ggplot2 to handle this situation?
+ theme(text=element_text(family="CM Roman"))
to your plot.For me that doesn't work when displaying the graphs in a window, but it does work when exporting to PDF with ggsave. Afterwards you have to embed the CM font into the PDF with 'embed_fonts'.
ps: Is there a way to generate vector outputs?
Note that if you want to include custom fonts with those outputs, it gets really complicated.
http://www.vikparuchuri.com/blog/making-infographics-using-r...
http://rforwork.info/2012/04/12/fun-editing-r-graphs-in-inks...
R takes a little getting used to but making graphs programmatically is pretty awesome.
The class materials and downloads. The wrap-up section has additional links:
I recently had a discussion with a friend of mine who's into academics (2nd PhD). He's highly proficient in LaTeX/Perl/R and typeset his own papers (for publishing and for conferences) but he mentioned that researchers shouldn't do that because this is too much time consuming and it could be better done by someone trained for that: a secretary. But budget cuts ended up forcing researchers, who can hardly type with one finger (and aren't trained to use LaTex/R/etc.) , to type out their papers.
Wouldn't it be better if researchers could just send a rough draft to a service that would typeset and make beautiful plots out of it ? Isn't your officemate (may I assume he is a researcher too ?) running the risk to spend too much time on formating papers (and God knows you can spend a lot of time in LaTeX and R docs) ?
I think most people at this point type better than they write, also I think they compose while they write, making edits etc. Plus errors in transcriptions. I haven't seen anyone doing much formatting/ typesetting of the text, which you are right, could be done by anyone.