Re: two-yaxes [message #7813] |
Sat, 11 January 1997 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Allen Bobby <ballen1@gl.umbc.edu> writes:
> I would like to know what is the best way to have two y-axes on a plot,
> where one is a logrithmic scale, and the other is not.
Do something like this:
; Create some data.
x = findgen(100)
theta = x/5
curve = Sin(x/5) / Exp(x/50)
; Create initial plot with non-log data. Don't draw right Y axis.
PLOT, curve, YSTYLE=8
; Create a log Y axis. Save the new axis scaling.
AXIS, YAXIS=1, YLOG=1, /SAVE, YRANGE=[0.1, 100]
; Overplot the log data.
OPLOT, x, theta
That should do it!
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|
|
|