[R] Problem with plotting a square 1 x 3 plot and placement of outer margin text

Uwe Ligges ligges at statistik.tu-dortmund.de
Wed Feb 8 20:44:03 CET 2012



On 07.02.2012 16:03, Mark Na wrote:
> Dear R-helpers,
>
> Please see the attached plot.
>
> The problem is that I have too much space between the x-axis label
> (which is mtext in an outer margin) and the plots.
>
> My par settings for this plot are:
>
>> par(mfrow=c(1,3),oma=c(2,2,2,2),mar=c(5.1,4.1,4.1,2.1),pty="s")
>> #here is the code that produces the three plots, which I have deleted for simplicity
>> mtext("Log Wetland Area",side=1,outer=TRUE)
>
> It works fine (less space between plots and outer margin text)) when I
> set pty="m" but then I get very long and skinny rectangular plots. I
> would like to keep the square plots.

Then you have to size the device in a way that it is roughly 3 times as 
wide as its height?

Uwe

>
> Any help would be much appreciated!
>
> Many thanks,
>
> Mark
>
>
>
> ______________________________________________
> 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