I would like to draw two perpendicular lines on the current device. They should both have the same apparent length on the device, irrespective of aspect ratio of the output and the device size.
Is this at all doable? In principle this is the problem of drawing a perfect circle on the screen.
You could retrieve the current graphics window coordinates. Thanks to Josh O'Brian for providing me with this code a while back. First you create a window (or plot something), then run this line:
myasp <- with(par(),(pin[2]/pin[1])/(diff(usr[3:4])/diff(usr[1:2])))
Then use that aspect information to adjust the lengths of the lines you're going to plot.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments