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

Home » Public Forums » archive » in multiplot to have common xaxis
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
in multiplot to have common xaxis [message #93702] Tue, 04 October 2016 01:33 Go to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
Hi,
I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.

How do we do that, can anybody give some tips.

thanks
Re: in multiplot to have common xaxis [message #93703 is a reply to message #93702] Tue, 04 October 2016 01:46 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, October 4, 2016 at 10:34:06 AM UTC+2, sid wrote:
> Hi,
> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>
> How do we do that, can anybody give some tips.
>
> thanks

Have a look at David's gallery:
http://www.idlcoyote.com/gallery/index.html
Look for ladder plot. That might be what you're looking for. If not, then you must explain better how it should look like.

In general you are looking at the "overplot"-ing. This is ok as long as the 4 vars have similar y values. Here is an example in FG:

pp = plot(/test)
ppr = pp.xrange
xx = findgen(201)
yy = sin(!pi*xx/100.0)
op = plot(xx,yy,'r',overplot=pp)

Cheers,
Helder
Re: in multiplot to have common xaxis [message #93704 is a reply to message #93703] Tue, 04 October 2016 02:33 Go to previous messageGo to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
On Tuesday, October 4, 2016 at 2:16:52 PM UTC+5:30, Helder wrote:
> On Tuesday, October 4, 2016 at 10:34:06 AM UTC+2, sid wrote:
>> Hi,
>> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>>
>> How do we do that, can anybody give some tips.
>>
>> thanks
>
> Have a look at David's gallery:
> http://www.idlcoyote.com/gallery/index.html
> Look for ladder plot. That might be what you're looking for. If not, then you must explain better how it should look like.
>
> In general you are looking at the "overplot"-ing. This is ok as long as the 4 vars have similar y values. Here is an example in FG:
>
> pp = plot(/test)
> ppr = pp.xrange
> xx = findgen(201)
> yy = sin(!pi*xx/100.0)
> op = plot(xx,yy,'r',overplot=pp)
>
> Cheers,
> Helder

I have different xaxis ranges say for example
plot1 x=[14.2,14.4,14.6,14.8]
y=[1.2e8,1.3e8,1.4e8,1.5e8]

plot2 x=[14.0,14.1,14.2,14.3,14.4,14.5]
y=[10,20,30,40,50,60]

I need to put both plot1 and plot2 as multiplot with one xaxis.
thanks
Re: in multiplot to have common xaxis [message #93705 is a reply to message #93704] Tue, 04 October 2016 02:36 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, October 4, 2016 at 5:33:36 AM UTC-4, sid wrote:
> On Tuesday, October 4, 2016 at 2:16:52 PM UTC+5:30, Helder wrote:
>> On Tuesday, October 4, 2016 at 10:34:06 AM UTC+2, sid wrote:
>>> Hi,
>>> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>>>
>>> How do we do that, can anybody give some tips.
>>>
>>> thanks
>>
>> Have a look at David's gallery:
>> http://www.idlcoyote.com/gallery/index.html
>> Look for ladder plot. That might be what you're looking for. If not, then you must explain better how it should look like.
>>
>> In general you are looking at the "overplot"-ing. This is ok as long as the 4 vars have similar y values. Here is an example in FG:
>>
>> pp = plot(/test)
>> ppr = pp.xrange
>> xx = findgen(201)
>> yy = sin(!pi*xx/100.0)
>> op = plot(xx,yy,'r',overplot=pp)
>>
>> Cheers,
>> Helder
>
> I have different xaxis ranges say for example
> plot1 x=[14.2,14.4,14.6,14.8]
> y=[1.2e8,1.3e8,1.4e8,1.5e8]
>
> plot2 x=[14.0,14.1,14.2,14.3,14.4,14.5]
> y=[10,20,30,40,50,60]
>
> I need to put both plot1 and plot2 as multiplot with one xaxis.
> thanks

Your data have different ranges, but you get to chose the XRANGE (with the XRANGE) keyword.
Re: in multiplot to have common xaxis [message #93706 is a reply to message #93705] Tue, 04 October 2016 03:18 Go to previous messageGo to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
On Tuesday, October 4, 2016 at 3:06:53 PM UTC+5:30, Craig Markwardt wrote:
> On Tuesday, October 4, 2016 at 5:33:36 AM UTC-4, sid wrote:
>> On Tuesday, October 4, 2016 at 2:16:52 PM UTC+5:30, Helder wrote:
>>> On Tuesday, October 4, 2016 at 10:34:06 AM UTC+2, sid wrote:
>>>> Hi,
>>>> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>>>>
>>>> How do we do that, can anybody give some tips.
>>>>
>>>> thanks
>>>
>>> Have a look at David's gallery:
>>> http://www.idlcoyote.com/gallery/index.html
>>> Look for ladder plot. That might be what you're looking for. If not, then you must explain better how it should look like.
>>>
>>> In general you are looking at the "overplot"-ing. This is ok as long as the 4 vars have similar y values. Here is an example in FG:
>>>
>>> pp = plot(/test)
>>> ppr = pp.xrange
>>> xx = findgen(201)
>>> yy = sin(!pi*xx/100.0)
>>> op = plot(xx,yy,'r',overplot=pp)
>>>
>>> Cheers,
>>> Helder
>>
>> I have different xaxis ranges say for example
>> plot1 x=[14.2,14.4,14.6,14.8]
>> y=[1.2e8,1.3e8,1.4e8,1.5e8]
>>
>> plot2 x=[14.0,14.1,14.2,14.3,14.4,14.5]
>> y=[10,20,30,40,50,60]
>>
>> I need to put both plot1 and plot2 as multiplot with one xaxis.
>> thanks
>
> Your data have different ranges, but you get to chose the XRANGE (with the XRANGE) keyword.

I want the xaxis only at the bottommost plot, top plots i dont want the xaxis to be displayed.
Re: in multiplot to have common xaxis [message #93707 is a reply to message #93706] Tue, 04 October 2016 03:30 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, October 4, 2016 at 12:18:36 PM UTC+2, gunvi...@gmail.com wrote:
> On Tuesday, October 4, 2016 at 3:06:53 PM UTC+5:30, Craig Markwardt wrote:
>> On Tuesday, October 4, 2016 at 5:33:36 AM UTC-4, sid wrote:
>>> On Tuesday, October 4, 2016 at 2:16:52 PM UTC+5:30, Helder wrote:
>>>> On Tuesday, October 4, 2016 at 10:34:06 AM UTC+2, sid wrote:
>>>> > Hi,
>>>> > I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>>>> >
>>>> > How do we do that, can anybody give some tips.
>>>> >
>>>> > thanks
>>>>
>>>> Have a look at David's gallery:
>>>> http://www.idlcoyote.com/gallery/index.html
>>>> Look for ladder plot. That might be what you're looking for. If not, then you must explain better how it should look like.
>>>>
>>>> In general you are looking at the "overplot"-ing. This is ok as long as the 4 vars have similar y values. Here is an example in FG:
>>>>
>>>> pp = plot(/test)
>>>> ppr = pp.xrange
>>>> xx = findgen(201)
>>>> yy = sin(!pi*xx/100.0)
>>>> op = plot(xx,yy,'r',overplot=pp)
>>>>
>>>> Cheers,
>>>> Helder
>>>
>>> I have different xaxis ranges say for example
>>> plot1 x=[14.2,14.4,14.6,14.8]
>>> y=[1.2e8,1.3e8,1.4e8,1.5e8]
>>>
>>> plot2 x=[14.0,14.1,14.2,14.3,14.4,14.5]
>>> y=[10,20,30,40,50,60]
>>>
>>> I need to put both plot1 and plot2 as multiplot with one xaxis.
>>> thanks
>>
>> Your data have different ranges, but you get to chose the XRANGE (with the XRANGE) keyword.
>
> I want the xaxis only at the bottommost plot, top plots i dont want the xaxis to be displayed.

Given no further specifications, why not this:

x1=[14.2,14.4,14.6,14.8]
y1=[1.2e8,1.3e8,1.4e8,1.5e8]
x2=[14.0,14.1,14.2,14.3,14.4,14.5]
y2=[10,20,30,40,50,60]
p1 = plot(x1,y1, /ylog)
p2 = plot(x2,y2, 'r', overplot=p1)

Otherwise, have a look at example 3 here:
http://www.harrisgeospatial.com/docs/plot_2d.html

Cheers,
Helder
Re: in multiplot to have common xaxis [message #93804 is a reply to message #93702] Fri, 21 October 2016 12:19 Go to previous messageGo to next message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Tuesday, October 4, 2016 at 3:34:06 AM UTC-5, sid wrote:
> Hi,
> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>
> How do we do that, can anybody give some tips.
>
> thanks

In DG, you would want to use XTICKFORMAT='(A1)'. Not sure about FG.

-Jeremy.
Re: in multiplot to have common xaxis [message #93807 is a reply to message #93804] Mon, 24 October 2016 07:17 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Friday, October 21, 2016 at 2:19:14 PM UTC-5, Jeremy Bailin wrote:
> On Tuesday, October 4, 2016 at 3:34:06 AM UTC-5, sid wrote:
>> Hi,
>> I need to plot time vs four other parameters. Xaxis will be time. So I am using the multiplot.pro for this purpose. But i want only once the Xaxis value to be displayed for the bottommost plot.
>>
>
> In DG, you would want to use XTICKFORMAT='(A1)'. Not sure about FG.
>
> -Jeremy.

For reference...

plt = PLOT(/test)
plt.xshowtext=0
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: hist_nd to resample point data to a grid
Next Topic: for loop problem for beginner

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

Current Time: Wed Oct 08 13:37:11 PDT 2025

Total time taken to generate the page: 0.00688 seconds