[R] Aspect Ratio

Joshua Wiley jwiley.psych at gmail.com
Thu Aug 19 23:22:22 CEST 2010


Hi,

>From the documentation for ?plot  'asp' the y/x aspect ratio, see
'plot.window'.  Here is a little demonstration of what different
values would look like:

#############
set.seed(1)
x <- rnorm(n = 1000, mean = 0, sd = 1)

# so that four plots can be in one window for comparison
par(mfcol=c(2,2))

# Make the four plots with a variety of aspect ratios
plot(x = x, asp = 2000)
plot(x = x, asp = 10)
plot(x = x, asp = 1)
plot(x = x, asp = 1/2)
##############


Cheers,

Josh

On Thu, Aug 19, 2010 at 2:13 PM, r.ookie <r.ookie at live.com> wrote:
> set.seed(1)
> x <- rnorm(n = 1000, mean = 0, sd = 1)
> plot(x = x, asp = 2000)
>
> Could someone please explain what the 'asp' parameter is doing?
>
> ______________________________________________
> 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list