# Graphing – margins, titles, mtext, workspace

This is a great post, very true, not enough of R’s graphics are well displayed online to really see how to achieve what the often ambiguous ‘help’ information suggests.

http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm

I particularly find “mtext(“lol”, outer=T)” to be particularly useful (requires “oma=c(2,2,2,2)” or similar).

http://addictedtor.free.fr/graphiques/ This site is somewhat of the way there, but I’ve found seeing the actual code to be rather clumsy.

## 2 thoughts on “Graphing – margins, titles, mtext, workspace”

1. I have 14 series and I want to plot them in a single graph.
I write the code, but when I want to plot all graph’s, them are to small and elongated.

I try this, but for 14 chart this code is unsatisfactory.
par(mfrow=c(7,2))
par(oma=c(4,2,1,1)); par(mar=c(2,5,0,1))

2. Hi catalinroibu, I’m not an expert of graphing so can only offer my anecdotal advice. Have you considered using either the ggplot2 package or the lattice package? http://had.co.nz/ggplot2/facet_grid.html ggplot2 is great but has a bit of a learning curve, you can see on this page there is a specific function for plotting data across multiple plots, this without the burden of so much white space and padding in between each plot. Another thing to consider, is regardless of oma and mar settings, how do you think 14 plots in one image will look? Depending on the number of data points in each it may just be way too much for anyone to take in, maybe some of them can be on the same axis with a legend to differentiate? Just a few suggestions of different functions to use and possible ways to approach your problem, hope that helps.