Re: axis problem [message #35779 is a reply to message #35778] |
Sun, 20 July 2003 08:26   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Reimar Bauer writes:
> But if I don't use _extra it looks different.
>
> I should have submitted this example too. Then xminor=0 looks different.
>
> pro test_axis_minor_error
> erase
> window,0
> tek_color
> plot,findgen(15),findgen(15),/nodata,xstyle=5,ystyle=5
>
> axis,xaxis=0,xticks=4,xminor=0,color=2
> axis,xaxis=1,xticks=4,xminor=1,color=2
>
> axis,yaxis=0,yticks=4,yminor=0,color=2
> axis,yaxis=1,yticks=4,yminor=1,color=2
>
> end
Ah, yes. I see now. Well, I *still* don't think this
is a bug. Here is why.
With *most* IDL system variables (the ![XYZ].MARGIN
system variable is an exception), setting the system
variable to 0 is equivalent to setting it to it's
*default* value. This is good, because otherwise
you couldn't ever restore the system variable to its
default value without knowing what it was.
I would argue that the MINOR keyword is a local way
of setting the ![XYZ].MINOR system variable. (Or something
like that. I don't really know what goes on under the hood.)
In any case, setting MINOR=0 is equivalent to saying to IDL
"do whatever the default thing is for minor tick marks". In
this case, you get the usual five tick intervals.
But when you put MINOR=0 into an _EXTRA keyword this
"default" behavior mechanism is circumvented, and the
MINOR keyword then is treated in a more literal sense.
I think this is proper and correct. You certainly can't
expect IDL to "process" keywords in an _EXTRA structure,
since finding the keywords would be a monumental task
and would slow IDL down terribly (for one thing, you
would have to process numerous spellings of the keyword,
since keywords can be shortened to their shortest
unambiguous spelling).
I think this is a case (there are many) in which
IDL has been programmed in a far-sighted and sensitive
way, and that it is doing *exactly* what it is
suppose to be doing: making life easier for the
programmer. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|