Re: /YNOZERO [message #42654] |
Sat, 19 February 2005 06:30  |
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.
|
|
|