[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date axis in object graphics (IDL 5.3)
- Subject: Re: Date axis in object graphics (IDL 5.3)
- From: "Mark Hadfield" <m.hadfield(at)niwa.cri.nz>
- Date: Tue, 1 Aug 2000 09:22:09 +1200
- Cache-Post-Path: clam-ext!unknown@gust.niwa.cri.nz
- Newsgroups: comp.lang.idl-pvwave
- Organization: NIWA
- References: <39851C57.62251B78@mhl.nsw.gov.au>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20545
"George Constantinides" <gconstantinides@mhl.nsw.gov.au> wrote in message
39851C57.62251B78@mhl.nsw.gov.au">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