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

Home » Public Forums » archive » Re: /YNOZERO
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: /YNOZERO [message #42654] Sat, 19 February 2005 06:30 Go to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <cv573u$mmc$1@news.nems.noaa.gov>, "Mr. No Address"
<no_given_address@landofthelost.net> wrote:


> I'm trying to create a plot with a fixed YRANGE for YAxis=0 and a self
> scaling range incorporating /YNOZERO for YAxis=1. Here is the code:
> PLOT, TIME, DATA.TEMP1, COLOR=0, /NODATA, YRANGE=[30,45], YSTYLE=8
> OPLOT, TIME, DATA.TEMP1, COLOR=1
> AXIS, YAxis=1, /YNOZERO, /Save
> OPLOT, TIME, DATA.TEMP2, COLOR=2
> The above code produces a YAxis=1 that is the same scale as YAxis=0. The
> only way I'm able to get YAxis=1 to a scale different than YAxis=0 is to
> explicitly set the range.
> Gary

What do you want Yaxis=1 to scale to? it doesn't know about the data, it
only knows what went into the environment variables, !y.crange and
!y.range. If you want a different scale yaxis=0, you will have to give it
a range.

what might do what you want is the following
;test data
x=findgen(100)*10.*!DTOR
a=sin(x)*10+100.
b=a-20.
position=[0.1,0.1,0.9,0.9]
black=fsc_color('black',255) & white = fsc_color('white',0) & red=fsc_color('red', 100)
plot, a, ystyle=8, yrange=[80,120], color=black, background=white,position=position
plot, b, /ynozero, xstyle=5, ystyle=5, color=red,/noerase, position=position
axis, 100., yax=1, color=red

;;;;
I imagine there are better ways though.

Chris.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Histogram shift
Next Topic: Importing IDL plots to Powerpoint on Mac

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

Current Time: Fri Oct 10 17:39:57 PDT 2025

Total time taken to generate the page: 0.71905 seconds