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

Home » Public Forums » archive » Re: combine subsections within xlabels
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
Re: combine subsections within xlabels [message #75428] Wed, 09 March 2011 13:04 Go to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Mar 9, 4:02 pm, Paolo <pgri...@gmail.com> wrote:
> On Mar 9, 4:00 pm, Paolo <pgri...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> On Mar 9, 3:57 pm, Paolo <pgri...@gmail.com> wrote:
>
>>> On Mar 9, 11:03 am, ele <eise...@googlemail.com> wrote:
>
>>>> Hi,
>
>>>> I'd like to plot two subsections from the x-axis straight after
>>>> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
>>>> 8 completly.
>
>>>> I have the label (wavelength) information as index in wl with 157
>>>> elements
>
>>>> plot, wl, lib[*,0]
>
>>>>  is it possible to force the plot somehow to ignor plotting and
>>>> labeling 3 to 8 on the x-axis
>
>>>> Thanks
>>>> Andreas
>
>>> Well, normally in this case you do 2 separate plots, but
>>> position them next to each other. It's a bit tricky sometimes
>>> to get them to align up properly but with some tweaking it should be
>>> possible. It may be wise to scale the 2 components such that they
>>> have the same size per unit of the x-coordinate (left as an exercise).
>
>>> plot,[1,2,1,1],xrange=[0,3],/
>>> xst,ystyle=8,position=[0.05,0.05,0.35,0.95]
>>> plot,[8,10,12],[1,2,0],xrange=[8,12],/
>>> xst,ystyle=4,position=[0.40,0.05,0.95,0.95],/noerase
>>> axis,12,0,/
>>> yaxis
>
>>> Ciao,
>>> Paolo
>
>> Aargh.... why google groups insist on wrapping messages so tightly?
>> I am going to make a test
>
>> 123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890
>
>> Willing to entertain bets on where this is going to be broken up...
>
>> Ciao,
>> Paolo
>
> Hmm... even stranger....
>
> 123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890
> plot,[1,2,3,4,5,6,7,8,9,10,11,12],[1,2,3,4,5,6,7,8,9,10,11,1 2],/
> xstyle,/ystyle,position=[0,0,1,1]
>
> those were both on one line...
>
> Ciao,
> Paolo

Ah! the slash (/) is used as an excuse to wrap it up....

Ciao,
Paolo
Re: combine subsections within xlabels [message #75429 is a reply to message #75428] Wed, 09 March 2011 13:02 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Mar 9, 4:00 pm, Paolo <pgri...@gmail.com> wrote:
> On Mar 9, 3:57 pm, Paolo <pgri...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
>> On Mar 9, 11:03 am, ele <eise...@googlemail.com> wrote:
>
>>> Hi,
>
>>> I'd like to plot two subsections from the x-axis straight after
>>> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
>>> 8 completly.
>
>>> I have the label (wavelength) information as index in wl with 157
>>> elements
>
>>> plot, wl, lib[*,0]
>
>>>  is it possible to force the plot somehow to ignor plotting and
>>> labeling 3 to 8 on the x-axis
>
>>> Thanks
>>> Andreas
>
>> Well, normally in this case you do 2 separate plots, but
>> position them next to each other. It's a bit tricky sometimes
>> to get them to align up properly but with some tweaking it should be
>> possible. It may be wise to scale the 2 components such that they
>> have the same size per unit of the x-coordinate (left as an exercise).
>
>> plot,[1,2,1,1],xrange=[0,3],/
>> xst,ystyle=8,position=[0.05,0.05,0.35,0.95]
>> plot,[8,10,12],[1,2,0],xrange=[8,12],/
>> xst,ystyle=4,position=[0.40,0.05,0.95,0.95],/noerase
>> axis,12,0,/
>> yaxis
>
>> Ciao,
>> Paolo
>
> Aargh.... why google groups insist on wrapping messages so tightly?
> I am going to make a test
>
> 123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890
>
> Willing to entertain bets on where this is going to be broken up...
>
> Ciao,
> Paolo


Hmm... even stranger....

123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890
plot,[1,2,3,4,5,6,7,8,9,10,11,12],[1,2,3,4,5,6,7,8,9,10,11,1 2],/
xstyle,/ystyle,position=[0,0,1,1]


those were both on one line...

Ciao,
Paolo
Re: combine subsections within xlabels [message #75430 is a reply to message #75429] Wed, 09 March 2011 13:00 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Mar 9, 3:57 pm, Paolo <pgri...@gmail.com> wrote:
> On Mar 9, 11:03 am, ele <eise...@googlemail.com> wrote:
>
>
>
>
>
>
>
>
>
>> Hi,
>
>> I'd like to plot two subsections from the x-axis straight after
>> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
>> 8 completly.
>
>> I have the label (wavelength) information as index in wl with 157
>> elements
>
>> plot, wl, lib[*,0]
>
>>  is it possible to force the plot somehow to ignor plotting and
>> labeling 3 to 8 on the x-axis
>
>> Thanks
>> Andreas
>
> Well, normally in this case you do 2 separate plots, but
> position them next to each other. It's a bit tricky sometimes
> to get them to align up properly but with some tweaking it should be
> possible. It may be wise to scale the 2 components such that they
> have the same size per unit of the x-coordinate (left as an exercise).
>
> plot,[1,2,1,1],xrange=[0,3],/
> xst,ystyle=8,position=[0.05,0.05,0.35,0.95]
> plot,[8,10,12],[1,2,0],xrange=[8,12],/
> xst,ystyle=4,position=[0.40,0.05,0.95,0.95],/noerase
> axis,12,0,/
> yaxis
>
> Ciao,
> Paolo

Aargh.... why google groups insist on wrapping messages so tightly?
I am going to make a test

123456789012345678901234567890123456789012345678901234567890 1234567890123456789012345678901234567890

Willing to entertain bets on where this is going to be broken up...

Ciao,
Paolo
Re: combine subsections within xlabels [message #75431 is a reply to message #75430] Wed, 09 March 2011 12:57 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Mar 9, 11:03 am, ele <eise...@googlemail.com> wrote:
> Hi,
>
> I'd like to plot two subsections from the x-axis straight after
> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
> 8 completly.
>
> I have the label (wavelength) information as index in wl with 157
> elements
>
> plot, wl, lib[*,0]
>
>  is it possible to force the plot somehow to ignor plotting and
> labeling 3 to 8 on the x-axis
>
> Thanks
> Andreas

Well, normally in this case you do 2 separate plots, but
position them next to each other. It's a bit tricky sometimes
to get them to align up properly but with some tweaking it should be
possible. It may be wise to scale the 2 components such that they
have the same size per unit of the x-coordinate (left as an exercise).

plot,[1,2,1,1],xrange=[0,3],/
xst,ystyle=8,position=[0.05,0.05,0.35,0.95]
plot,[8,10,12],[1,2,0],xrange=[8,12],/
xst,ystyle=4,position=[0.40,0.05,0.95,0.95],/noerase
axis,12,0,/
yaxis


Ciao,
Paolo
Re: combine subsections within xlabels [message #75432 is a reply to message #75431] Wed, 09 March 2011 08:17 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ele writes:

> I'd like to plot two subsections from the x-axis straight after
> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
> 8 completly.
>
> I have the label (wavelength) information as index in wl with 157
> elements
>
> plot, wl, lib[*,0]
>
> is it possible to force the plot somehow to ignor plotting and
> labeling 3 to 8 on the x-axis

Set the values you don't want to plot to !Values.F_NAN.
The labeling you may have to specify yourself. You could
write a tick formatting function that returned null strings
for values between 3 and 8.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: combine subsections within xlabels [message #75494 is a reply to message #75431] Fri, 11 March 2011 07:53 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 9 Mrz., 21:57, Paolo <pgri...@gmail.com> wrote:
> On Mar 9, 11:03 am, ele <eise...@googlemail.com> wrote:
>
>
>
>
>
>
>
>
>
>> Hi,
>
>> I'd like to plot two subsections from the x-axis straight after
>> eachother, say from 0 - 3 and from 8 - 14, ignorring the gap from 3 to
>> 8 completly.
>
>> I have the label (wavelength) information as index in wl with 157
>> elements
>
>> plot, wl, lib[*,0]
>
>>  is it possible to force the plot somehow to ignor plotting and
>> labeling 3 to 8 on the x-axis
>
>> Thanks
>> Andreas
>
> Well, normally in this case you do 2 separate plots, but
> position them next to each other. It's a bit tricky sometimes
> to get them to align up properly but with some tweaking it should be
> possible. It may be wise to scale the 2 components such that they
> have the same size per unit of the x-coordinate (left as an exercise).
>
> plot,[1,2,1,1],xrange=[0,3],/
> xst,ystyle=8,position=[0.05,0.05,0.35,0.95]
> plot,[8,10,12],[1,2,0],xrange=[8,12],/
> xst,ystyle=4,position=[0.40,0.05,0.95,0.95],/noerase
> axis,12,0,/
> yaxis
>
> Ciao,
> Paolo

Very cool!

Cheers

CR
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: readcol not reading all lines
Next Topic: Merging Postcript files

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

Current Time: Wed Oct 08 11:34:32 PDT 2025

Total time taken to generate the page: 0.00729 seconds