Re: Adjacent plot question [message #51745] |
Wed, 06 December 2006 17:21 |
Richard French
Messages: 173 Registered: December 2000
|
Senior Member |
|
|
On 12/6/06 7:36 PM, in article
pan.2006.12.07.00.36.13.873885@as.arizona.edu, "JD Smith"
<jdsmith@as.arizona.edu> wrote:
> On Wed, 06 Dec 2006 18:49:23 -0500, Richard G. French wrote:
>
>> I'd like to have three vertical plots abutted vertically, with the bottom
>> plot having the labels on the x axis and the other plots just having tick
>> marks. I can use the YMARGIN=[lower,upper] keyword to the plots, but I have
>> not succeeded in getting all the plot boxes to have the same size, because
>> the bottom plot gets vertically scrunched in order to have room for the x
>> axis tick mark lables. Does someone have a handy driver routine to handle
>> this, or do I need to fiddle around with the POSITION keyword? Even here,
>> how can I make sure that the axis boxes all have the same size? Thanks!
>
>
> Just cleaned this up:
>
> http://turtle.as.arizona.edu/idl/gang_plot_pos.pro
>
> It uses _EXTRA as a trick to get the tick labeling correct, and can abut
> any number of plots horizontally and vertically.
>
> JD
Very slick! It's nice to see an example of _EXTRA as well. Many thanks!
And thanks, David, for the alternative approach, which I was fiddling around
with while you were cleaning house.
Dick
|
|
|
Re: Adjacent plot question [message #51746 is a reply to message #51745] |
Wed, 06 December 2006 16:36  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Wed, 06 Dec 2006 18:49:23 -0500, Richard G. French wrote:
> I'd like to have three vertical plots abutted vertically, with the bottom
> plot having the labels on the x axis and the other plots just having tick
> marks. I can use the YMARGIN=[lower,upper] keyword to the plots, but I have
> not succeeded in getting all the plot boxes to have the same size, because
> the bottom plot gets vertically scrunched in order to have room for the x
> axis tick mark lables. Does someone have a handy driver routine to handle
> this, or do I need to fiddle around with the POSITION keyword? Even here,
> how can I make sure that the axis boxes all have the same size? Thanks!
Just cleaned this up:
http://turtle.as.arizona.edu/idl/gang_plot_pos.pro
It uses _EXTRA as a trick to get the tick labeling correct, and can abut
any number of plots horizontally and vertically.
JD
|
|
|
Re: Adjacent plot question [message #51751 is a reply to message #51746] |
Wed, 06 December 2006 16:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Richard G. French writes:
> I'd like to have three vertical plots abutted vertically, with the bottom
> plot having the labels on the x axis and the other plots just having tick
> marks. I can use the YMARGIN=[lower,upper] keyword to the plots, but I have
> not succeeded in getting all the plot boxes to have the same size, because
> the bottom plot gets vertically scrunched in order to have room for the x
> axis tick mark lables. Does someone have a handy driver routine to handle
> this, or do I need to fiddle around with the POSITION keyword? Even here,
> how can I make sure that the axis boxes all have the same size? Thanks!
Here is how I make a stacked ladder plot:
http://www.dfanning.com/graphics_tips/ladder_plot.html
Unfortunately, you have to fool around with POSITION,
I think. What you could do, to make this easy on yourself,
is something like this:
Window, XSize=300, YSize=600 ; Window for plot.
p = Aspect(3.0) ; normalized coordinates for 3/1 plot ratio
p1 = p[1]
len = (p[3] - p[1]) / 3
p2 = p1 + len
p3 = p1 + (2*len)
p4 = p[2]
Now p1 through p4 are the Y values you need (in normalized
coordinates) for the three equal-area plots. p[0] and p[2]
are the x coordinates.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|