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

Home » Public Forums » archive » Re: axis problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: axis problem [message #35778 is a reply to message #35777] Sun, 20 July 2003 09:23 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:
> 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 I can't agree

It can't be that the user program has to test what keywords values are
set as default by a routine and if it has this value then it must be
killed from the _extra structure if it is there.

With all the other keywords it works as supposed. It would be very bad
if it is somewhere defined that's the user is not able to pass default
values by _extra. It must be possible to switch back to the whatever
default value by submitting 0 for example.

At the moment I believe there is a bug with the querying of xyz minor.
They used keyword_set() instead of n_elements() and ...

Is someone out there with a version before 5.0 and could test the examples?

regards
Reimar



























--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Thank you all for helps,
Next Topic: Leading zeros in Format

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

Current Time: Sat Nov 29 08:31:00 PST 2025

Total time taken to generate the page: 1.19525 seconds