Re: usersym keywords -- why? [message #63435 is a reply to message #63429] |
Mon, 10 November 2008 18:19   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Christopher Thom writes:
> Debugging some code today, I discovered what I would consider to be
> strange behaviour. Although...maybe this is a "feature". Consider the
> following:
>
> usersym, [ -1, 0, 1, -1 ], [ 1, -1, 1, 1 ], thick = 20
> plot, findgen(10), ps=8, thick = 2
>
> Is there any reason why usersym accepts thickness and color keywords? And,
> more importantly, why the keywords passed to plot/oplot don't over-ride
> them?
>
> I was using some symbols from the awesome symcat() library [thanks david!]
> when I discovered this. The only workaround I could come up with was to
> extend symcat() to accept and pass _extra keywords to usersym...which now
> gives me the even more confusing:
>
> plot, findgen(10), ps = symcat(11, thick = 20), thick = 2
>
> If anyone can see a sane or (better!) elegant solution to the thickness
> madness I've been having all afternoon, I'd love to hear of it.
I can't really make out what you think the problem is.
I think IDL is doing exactly the right and expected thing
here: if I make a user symbol, I don't want someone outside
messing around with it.
Why did you have to extend SYMCAT? It already takes the THICK
keyword.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|