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]]
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 at 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.
Hi Nick, If you can bear using R base graphics, the plotrix package has a function named "getYmult" that allows you to adjust for the aspect ratio of any plot area. Jim On Sun, Apr 3, 2022 at 11:14 PM Nick Wray <nickmwray at gmail.com> wrote:> > 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 at 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.