Re: [R] setting par(srt) according to plot aspect ratio

2009-08-29 Thread Jim Lemon
Levi Waldron wrote: For posterity's sake, here is the solution I figured out. Putting the following lines after the plot(f) command seems to set the angle correctly: myasp - (par(fin)[2]-par(mai)[1]-par(mai)[3])/(par(fin)[1]-par(mai)[2]-par(mai)[4]) (f_angle - atan(myasp)*180/pi) (g_angle -

Re: [R] setting par(srt) according to plot aspect ratio

2009-08-28 Thread Levi Waldron
On Fri, Aug 28, 2009 at 1:48 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: Note that the aspect ratio changes when you resize the plot but the angle of the plotted text will not. So the only safe route is to set 'asp' and use that setting to select the angle. That is true with screen

Re: [R] setting par(srt) according to plot aspect ratio

2009-08-27 Thread Levi Waldron
I frequently use R's help facilities and I know about the asp argument to plot, but this doesn't answer my question. I would like to allow the aspect to be determined automatically but *query* the aspect ratio for future use. I suppose one work-around would be to use the data ranges and plot

Re: [R] setting par(srt) according to plot aspect ratio

2009-08-27 Thread Levi Waldron
For posterity's sake, here is the solution I figured out. Putting the following lines after the plot(f) command seems to set the angle correctly: myasp - (par(fin)[2]-par(mai)[1]-par(mai)[3])/(par(fin)[1]-par(mai)[2]-par(mai)[4]) (f_angle - atan(myasp)*180/pi) (g_angle - atan(2*myasp)*180/pi)