[R] how to get rid of unused space on all 4 borders in plot() render

Petr PIKAL petr.pikal at precheza.cz
Tue Nov 23 09:47:50 CET 2010


Hi

r-help-bounces at r-project.org napsal dne 21.11.2010 19:31:33:

> 
> I have looked into par documentation, and only setting for size of the 
plot
> area was pin. But this setting sets the area as inflexible, that is no

R intro manual

Chapter 12: Graphical procedures page, 71
A typical figure is....

>From that you can find that

pin
The current plot dimensions, (width,height), in inches.

mar
A numerical vector of the form c(bottom, left, top, right) which gives the 
number of lines of margin to be specified on the four sides of the plot. 
The default is c(5, 4, 4, 2) + 0.1.




So David's remark to look at provided documentation seems to be correct. R 
is not Tetris but comes with quite good documentation and you shall use 
it. It would help you a lot.

par(mar=c(2,1,1,1)+.1)

Regards
Petr


> matter how I make the window small or big it stays the same. Default 
value
> has advantage that however it uses plot area that is always smaller than
> device area still this area is changing with the window and able to be
> bigger.
> -- 
> View this message in context: 
http://r.789695.n4.nabble.com/how-to-get-rid-of-
> unused-space-on-all-4-borders-in-plot-render-tp3052527p3052631.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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