|
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  |
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  |
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  |
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  |
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.")
|
|
|