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

Home » Public Forums » archive » Re: two-yaxes
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: two-yaxes [message #7813] Sat, 11 January 1997 00:00
davidf is currently offline  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
-----------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: font/widget question
Next Topic: Configuration / Testing Management

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

Current Time: Wed Oct 08 18:07:23 PDT 2025

Total time taken to generate the page: 0.00466 seconds