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

Home » Public Forums » archive » add a period 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: add a period axis? [message #27230 is a reply to message #27160] Tue, 16 October 2001 08:07 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
jeyadev@wrc.xerox.com (Surendar Jeyadev) writes:

> In article <onbsjci5hf.fsf@cow.physics.wisc.edu>,
> Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote:
>> jeyadev@wrc.xerox.com (Surendar Jeyadev) writes:
>>
>>> Awww! This is too easy! It does help that 1.0 lines up with 0.1, 2.0 with
>>> 0.2, ... etc. Things look nice. How about when you want to have
>>> xrange = [0,15], but you want the upper axis to be some specific values
>>> that are calculated from the lower axis. I run into this typically in
>>> trying to have two different ways of specifying the same underlying
>>> variable. For a no so moronic example, let the x axis be some length
>>> in metres. Now, for some people's benefit, I would like to have
>>> feet on the upper scale. But, it is ugly to have 1.5432, 2.1793, ...
>>> labels. One would like that hash marks to be laid at 1.5, 2.0, etc.
>>> Any chance of a routine out there?
>>
>> Ummm, and this doesn't do the trick with no fuss or muss?
>>
>> plot, findgen(10), xstyle=8, xrange=[0,10] ;; X axis in meters
>> axis, xrange=[0,10]*3.281, xaxis=1, xstyle=1 ;; X axis in feet
> ^^^^^^^^^^^^^^^^^^^
>
> You really meant
>
> xrange = !x.crange*3.281
>
> didn't you?!!!!!

Well, I didn't really mean that when I wrote it, but since I had just
done XRANGE=[0,10] in the previous command, they are essentially the
same.

> I picked a linear relationship (in PV-Wave the example of plotting
> temperature in F and C is given :-(' ), but what is the relationship
> is not linear? For example, velocity and power so that the upper
> axis is the square of the lower one? Is there a nifty way to do
> that?

I don't see why it's any different. You can pass any range you wish
to the XRANGE keyword of AXIS, and nice tick marks will come out.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fit function
Next Topic: IDL Help Gone Missing

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

Current Time: Sat Oct 11 09:36:14 PDT 2025

Total time taken to generate the page: 1.67873 seconds