[R] compressing the plot's white space

Duncan Murdoch murdoch at stats.uwo.ca
Sat Jun 27 15:22:42 CEST 2009


On 27/06/2009 3:06 AM, Alexy Khrabrov wrote:
> I need to fit a graph into a column of a 2-column paper.  I found that
> just specifying width and height parameters (3.2in x 3.5in) to plot
> doesn't decrease the fonts of the main title, axis titles, and
> labeling numbers, and tick sizes. 

I normally plot somewhat larger than I'd like the plot displayed, and 
shrink it to fit.  This reduces everything proportionally.

  So I have to add cex to all labels
> and titles and manage ticks.  However, I can't decrease the space
> between axis label and numbers on ticks. 

That is controlled by par("mgp").

Duncan Murdoch

  Is there a way to place
> those numbers inside the plot, and/or explicitly remove most of the
> space between the numbers and the axis title?  Also, how should I
> specify the margins to achieve best white space elimination?  On
> Quartz, decreasing margins seem to squeeze the titles properly, on
> postscript device, the axis titles simply move outside the plot.
> 
> Cheers,
> Alexy
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list