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

Home » Public Forums » archive » Date axis in object graphics (IDL 5.3)
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
Date axis in object graphics (IDL 5.3) [message #20910] Mon, 31 July 2000 00:00 Go to next message
George Constantinides is currently offline  George Constantinides
Messages: 16
Registered: July 2000
Junior Member
Hi all IDL gurus,

This should be an easy one for you.
I am using LABEL_DATE to produce a time axis in object graphics as
follows:

;...... some code ....
dummy = Label_Date(Date_Format = '%D-%M!C%H',Offset=start_date)
;...... some more code ....
xAxis = Obj_New("IDLgrAxis", 0, Color=[255,255,0], Ticklen=0.025, $

Minor=4, Range=xrange, Title=xtitle, TickDir=1, $
TickFormat = 'Label_Date',Location=[0, 0.2 ,0])
;.......

I expect the HOURS to appear below the date. This works in direct
graphics but in object graphics it does not understand !C as a directive
and instead displays it as a literal.

Am I going something wrong, or have I discovered bag number: 4527

Regards

GC
Re: Date axis in object graphics (IDL 5.3) [message #20963 is a reply to message #20910] Tue, 01 August 2000 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"George Constantinides" <gconstantinides@mhl.nsw.gov.au> wrote in message
news:39851C57.62251B78@mhl.nsw.gov.au...
> This should be an easy one for you.
> I am using LABEL_DATE to produce a time axis in object graphics as
> follows:
>
> ;...... some code ....
> dummy = Label_Date(Date_Format = '%D-%M!C%H',Offset=start_date)
> ;...... some more code ....
> xAxis = Obj_New("IDLgrAxis", 0, Color=[255,255,0], Ticklen=0.025, $
>
> Minor=4, Range=xrange, Title=xtitle, TickDir=1, $
> TickFormat = 'Label_Date',Location=[0, 0.2 ,0])
> ;.......
>
> I expect the HOURS to appear below the date. This works in direct
> graphics but in object graphics it does not understand !C as a directive
> and instead displays it as a literal.
>
> Am I going something wrong, or have I discovered bag number: 4527

No you're not doing anything wrong. Text objects do not recognise !C,
although they do recognise other formatting codes if create with the
ENABLE_FORMATTING property set.

I don't think it's really a bug (or a bag), just a limitation.

P.S. Ticktext objects created by an IDLgrAxis have ENABLE_FORMATTING turned
off. To turn it on you can do:

oaxis->GetProperty, TICKTEXT=ticktext
for i=0,n_elements(ticktext)-1 do $
if obj_valid(ticktext[i]) then $
ticktext[i]->SetProperty, /ENABLE_FORMATTING

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: =?iso-8859-1?Q?=EE=CF=D7=D9=C5=20=CE=C5=CD=C5=C3=CB=C9=C5=20=C1=D7=D4=CF=CD=CF=C2=C9=CC=C9=20=D7=20=EF=C4=C5=D3=D3=C5?=
Next Topic: IMDISP update

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

Current Time: Wed Oct 08 19:16:12 PDT 2025

Total time taken to generate the page: 0.00700 seconds