Message-ID: <7E4C06F49D6FEB49BE4B60E5FC92ED7A02D06AA3@pnlmse35.pnl.gov>
Date: 2005-10-11T19:41:37Z
From: Waichler, Scott R
Subject: How to get aspect ratio as output from from plot()
Sundar,
> Perhaps this will work for you?
>
> plot(1:10)
> w <- par("pin")[1]/diff(par("usr")[1:2])
> h <- par("pin")[2]/diff(par("usr")[3:4])
> asp <- w/h
Thank you for your help. For vertical exaggeration I will make a slight
change to make it more intuitive (for me):
w <- diff(par("usr")[1:2]) / par("pin")[1] # plot units per inch
horizontal axis
h <- diff(par("usr")[3:4]) / par("pin")[2] # plot units per inch
vertical axis
vertical.exaggeration <- w/h
Scott Waichler