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

Home » Public Forums » archive » Pan/Zoom Line Plots with Coyote Graphics
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: Pan/Zoom Line Plots with Coyote Graphics [message #80263 is a reply to message #80153] Fri, 25 May 2012 07:48 Go to previous messageGo to previous message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On Friday, May 25, 2012 3:19:03 AM UTC-6, Fab wrote:
> Bonus question: are IDL NG routines better at labeling time
> automatically? (in other words: should I go for IDL 8.2?)

Here's a start:

pro timeaxis_ex
compile_opt idl2

; Ten days of data; each sample taken at noon UTC.
time_min = julday(1,20,2012,12,0,0)
time_max = julday(1,29,2012,12,0,0)
time = timegen(start=time_min, final=time_max)
foo = randomn(1, 10)

p = plot(time, foo, 'r', $
xtickunits='days', $
xtickformat='(C(CMoA,1x,CDI))', $
title='Time Axis Example')
end

Zoom by rolling the scroll wheel. I chose 'days' as the tickunit; you may want to build logic into the window (using NG event handling) to change XTICKUNITS and XTICKFORMAT conditioned on p.xrange.

mp
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Type of array to store large numbers
Next Topic: Re: ps_start and color

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

Current Time: Thu Oct 09 14:57:22 PDT 2025

Total time taken to generate the page: 1.59537 seconds