Re: Help with IDLgrAxis [message #11393] |
Wed, 08 April 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mostafa El-Kady (mostafa@kraken.atmos.colostate.edu) writes:
> I am trying to draw an axis with variable tick interval. As I understood
> from the documents, I can use TICKVALUES to do that. So, here is what
> I did:
>
> ticks = [0, 0.1, 0.3, 0.8, 1.0]
> text = OBJ_NEW('IDLgrText', STRING(ticks))
> axis = OBJ_NEW('IDLgrAxis', 0, MAJOR=N_ELEMENTS(ticks), /EXACT, $
> TICKTEXT=text, TICKVALUES=ticks)
>
> The resulting axis has tickvalue of 0, 0.1, 0.3, 0.8, 1.0 as I want
> it, but at equal intervals. From the GetProperty method, I get
> TICKVALUES as 0.00 0.25 0.50 0.75 1.00
As far as I know, it is NOT possible to create an axis in
either direct or object graphics with variable tick intervals,
unless you entirely suppress the tick labels and marks and
draw them yourself with low-level routines like PlotS and XYOutS.
I don't think it would be too hard to write your own variable
interval axis routine from scratch, however. (Perhaps Martin
Schultz will do it for us. He has been in the programming
groove lately. :-) )
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|