comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: multi plot with superposed axis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: multi plot with superposed axis [message #72395 is a reply to message #72394] Wed, 01 September 2010 08:13 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Sep 1, 10:29 am, bing999 <thibaultga...@gmail.com> wrote:
> Ok, thanks a lot. I use IDL 7.
>
> It works but bothers me now, is the size. Each plot is a bit elongated
> in the horizontal direction and i'd like to make it more "squared'. By
> the way, how to make the whole plot bigger ?
>
>> On Sep 1, 5:31 am, bing999 <thibaultga...@gmail.com> wrote:
>
>>> Hi,
>
>>> I would like to make a plot containing 4 figures, displayed in 2x2, so
>>> that the axis are superposed. (that is to say, in the left column for
>>> instance, the top horizontal axis of the bottom figure is stacked to
>>> the bottom horizontal axis of the top figure)
>
>>> Is there a way to do that ?
>>> Thank you!
>
>> What version of IDL do you use?  In IDL 7, use MULTIPLOT from the NASA
>> IDL library.  In 8, use the layout and /current keywords to your
>> plots, and set margin=0 on all of them.
>
>


In my experience, to get best results it is better to bite the bullet
and just use the position parameter to plot manually. That ensures
that
the plots are positioned just the way you need them.

For instance I would do something like:

xrange=[2,7]
x=findgen(10)
y1=x^2
y2=sqrt(x)

plot,x,y1,xrange=xrange,position=[0.1,0.1,0.9,0.5]
plot,x,y2,xrange=xrange,position=[0.1,0.5,0.9,0.9],/
noerase,xtickn=replicate(' ',30)

Of course you may want to fine tune the y tick labels so they do not
collide.

Ciao,
Paolo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Insert an image in Excel
Next Topic: object association

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 08:59:12 PDT 2025

Total time taken to generate the page: 1.28135 seconds