On May 20, 2008, at 5:59 PM, Deepayan Sarkar wrote:

On 5/20/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote:

Here is how I see it. Let me define a "visual y-unit" as the height of a
unit of data in the y-direction, and similarly for a visual x-unit.
Then the aspect ratio is the quotient of the visual y-unit over the visual x-unit. So the aspect ratio is the number of visual x-units that have the
same length as one visual y-unit.

[Not that it matters, but it is not clear what you mean here. Let's
say we have a 100cm x 100cm plot, with data ranges xlim=c(0, 100) and
ylim=c(0, 200). Then, the aspect ratio is 1, your "visual y-unit" is
0.5cm, and "visual x-unit" is 1cm (so their ratio is 0.5).]

So in this case, the slope of the line y=x, which is 1, appears as 0.5. I effectively wanted to combine the two effects, of the sizes of the two scales and of the sizes of the window. They both have an effect on how a line of slope 1 is seen. But perhaps I am missing something here?

If a line has real (data) slope r, and the aspect ratio is b, then the line
appears with slope rb.

Agreed.

Now, there are two things one can compute (for simplicity I assume all
slopes are positive, insert absolute values as necessary):
1. The value of the aspect ratio, that makes the median of the visual slopes be 1. This would be obtained by requiring the median of all the rb to
be 1, which means that the aspect ratio would be 1/median(slopes).
2. The median of the aspect ratios, that make each individual line have slope 1. So for each line with slope r, we consider the aspect ratio 1/r,
and then take the median of that. So this would be median(1/slopes).

I agree with your analysis, but would claim that both calculations are
"right", since the median of 2 numbers is formally any number in
between.

That's a very good point, I never thought of it that way (though I have to say, I haven't seen anything but the arithmetic average used in getting "THE median" before).

I think it is unlikely that the difference in calculations
leads to any difference in the perceptual benefits.

Agreed.

Of course, the current calculation has the advantage of doing one less
division! :-)

For me, that's reason enough to keep it as is ;)

-Deepayan

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

______________________________________________
R-help@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.

Reply via email to