Contemplating Tick Lengths [message #77850] |
Mon, 03 October 2011 09:53 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I am contemplating tick lengths this morning. (I know,
I need to get a life.)
The only thing I can conclude absolutely about them
is that the IDL documentation that describes them
is totally wrong. This applies to the IDL 7 and IDL 8
documentation, and to both direct graphics and (to a
larger extent) function graphics routines. I am fairly
confident that I won't be corrected if I assert that
no one in the world knows how they work. A corollary,
of course, is that I'm probably the only person in the
world who cares about the subject, and it is driving
me crazy!
Here is what I have been able to deduce so far.
In direct graphics, the tick length is not "expressed
in normalized coordinates of the window". Rather, it
is expressed in normalized coordinates of the plot itself.
data = cgDemoData(1)
cgDisplay
cgPlot, data, XTicklen=0.25
cgDisplay, WID=1
cgPlot, data, Position=[0.1,0.1,0.9, 0.5], XTicklen=0.25
This is even more vividly demonstrated on color bars, whose
plots are very thin, making the default tick lengths very
small, indeed.
In direct graphics, the minor tick marks are half the size
of the major tick marks, as long as the length of the major
tick mark is less than 0.3. If it is greater than 0.3,
then the minor tick marks revert to a 0.01 length, which
essentially makes them invisible on color bars.
cgDisplay, WID=3
cgPlot, data, XTicklen=0.3,Position=[0.1,0.1,0.9, 0.5]
cgColorbar, Ticklen=0.3
Function graphics tickmarks are even more incomprehensible.
There doesn't seem to be any relationship whatsoever between
a value and the plot or window or phase of the moon! I really
don't understand how these work at all. There is one
advantage of function graphics tickmarks, in that you can
independently "control" both the major and minor tick lengths.
But, since you can't figure out how they actually work, the
advantage is of dubious value. :-(
I've got better things to do with my time, but maybe
I'll write an article about what I have learned today.
I thought I would mention it here just as a place holder. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|