[R] Plotting proportions

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sun Apr 3 17:25:57 CEST 2022


Hello,

There's a graphics parameter for aspect ratio that you can set asp=1 on 
a plot by plot basis. But you also need to change pty. From ?par:

pty
A character specifying the type of plot region to be used; "s" generates 
a square plotting region and "m" generates the maximal plotting region.



old_par <- par(pty = "s")
plot(1, asp = 1)
par(old_par)


Hope this helps,

Rui Barradas

Às 14:13 de 03/04/2022, Nick Wray escreveu:
> Hello  If you plot a square in the default R studio window you see a
> rectangle.  Does anyone know what the proportions of the sides of this
> rectangle are?  Thanks Nick Wray
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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