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

Home » Public Forums » archive » Re: How do you associate data with a secondary Y axis?
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: How do you associate data with a secondary Y axis? [message #76928] Thu, 14 July 2011 08:29
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
The TARGET keyword is key. Please try this:

x = findgen(10)
y1 = x
y2 = -x
p1 = plot(x, y1, 'r', axis_style=1)
p2 = plot(x, y2, 'b', /current, axis_style=0)
a2 = axis('y', target=p2, location=[max(p2.xrange),0,0], textpos=1)

You'll likely want to play with the MARGIN keyword to give room for the second y axis title.

mp
[Message index]
 
Read Message
Previous Topic: GONG SOLAR DATA ANALYSIS IN IDL
Next Topic: Re: GONG SOLAR DATA ANALYSIS IN IDL

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

Current Time: Wed Oct 08 15:52:28 PDT 2025

Total time taken to generate the page: 0.00401 seconds