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

Home » Public Forums » archive » Re: trivial problem: How do I change the axis scale in an image plot?
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: trivial problem: How do I change the axis scale in an image plot? [message #82517] Tue, 18 December 2012 21:22
Balthasar Indermuehle is currently offline  Balthasar Indermuehle
Messages: 22
Registered: August 2012
Junior Member
Congratulations! I covet snow, in 30C Sydney at this time of year... one of the things I'll never get used to having been a northern hemispherian until my mid 30's...
Re: trivial problem: How do I change the axis scale in an image plot? [message #82518 is a reply to message #82517] Tue, 18 December 2012 21:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Balthasar Indermuehle writes:

> Got that one solved:
>
> Add these axkeywords:
>
> YTICKS: 8, YTICKV: [1*60, 5*60, 10*60, 15*60, 30*60, 60*60, 120*60, 240*60, 480*60]
>
> Note they need to be in the pre-scaled units, hence, the * 60 multiplier.

Hooray! Coyote got me drinking margaritas tonight to
celebrate the first snow fall of the season. Don't
believe I could have figured this out by myself! :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: trivial problem: How do I change the axis scale in an image plot? [message #82519 is a reply to message #82518] Tue, 18 December 2012 20:55 Go to previous message
Balthasar Indermuehle is currently offline  Balthasar Indermuehle
Messages: 22
Registered: August 2012
Junior Member
Got that one solved:

Add these axkeywords:

YTICKS: 8, YTICKV: [1*60, 5*60, 10*60, 15*60, 30*60, 60*60, 120*60, 240*60, 480*60]

Note they need to be in the pre-scaled units, hence, the * 60 multiplier.

Cheers

- Balt
Re: trivial problem: How do I change the axis scale in an image plot? [message #82520 is a reply to message #82519] Tue, 18 December 2012 20:41 Go to previous message
Balthasar Indermuehle is currently offline  Balthasar Indermuehle
Messages: 22
Registered: August 2012
Junior Member
Thanks David, your awesomeness scores again! This works indeed. Do you know is there a way to make it put ticks at particular points? My range now goes from 0.2 to 831.9 minutes and the , let's say I want tick marks at 1, 5, 10, 15, 30, 60, 120, 240, 480 minute intervals?

Cheers

- Balt
Re: trivial problem: How do I change the axis scale in an image plot? [message #82521 is a reply to message #82520] Tue, 18 December 2012 19:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Balthasar Indermuehle writes:

> I'm having an off day... I have an image that's plotted using the cgIMAGE function. The Yscale is in seconds, and in log space. That all works beautifully, except I'd like it to be in minutes, not seconds... surely there's a simple way to replace the original Y axis labels with ones that are divided by 60?

I'd try this tick formatting function:

FUNCTION DoSeconds, axis, index, number
Return, String(number/60., Format='(F7.1)')
END

And set your YTickFormat keyword to it:

cgImage, ..., YTICKFORMAT='DoSeconds'

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: trivial problem: How do I change the axis scale in an image plot?
Next Topic: Read PDF on a Mac

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

Current Time: Wed Oct 08 15:16:56 PDT 2025

Total time taken to generate the page: 0.00971 seconds