Re: cgplot clobbers user symbols [message #76083 is a reply to message #76073] |
Wed, 18 May 2011 14:23  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jeremy Bailin writes:
> I just discovered a behaviour of cgPlot that disturbs me somewhat. If I define a user symbol using USERSYM and then use it in cgPlot using PSYM=8, it works fine. But I follow it up with PSYM=something_else, my user symbol gets clobbered and the next call with PSYM=8 plots it with something_else.
>
> For example:
>
> usersym, [-1,1], [-1,1] ; diagonal line
> ; this gives a diagonal line, as expected:
> cgplot, findgen(10), findgen(10), psym=8
> ; this gives plusses, as expected:
> cgplot, /overplot, findgen(10), findgen(10) + 0.5, psym=1
> ; I expected diagonal lines, but I get plusses:
> cgplot, /overplot, findgen(10), findgen(10) - 0.5, psym=8
>
>
> Is this "expected behaviour"?
Well, probably. :-)
The problem is, I am using USERSYM myself to create
plot symbols by calling SYMCAT. I suppose I don't
*have* to use USERSYM for symbols 1 and 4-6, I could just
return those numbers, but I am using it for some
reason. (I probably didn't like the symbols IDL
was creating, I would guess.)
In any case, I could restore this functionality for
symbols 1-7, but not for symbols 11-46, since I have
to use SYMCAT to produce those symbols.
The "best" solution, probably, would just be to extend
SYMCAT with the symbols you want to use. We can put
an unlimited number of symbols in there. Tell me what
you want, and I'll add them. Or, you can add them,
and send the file to me. :-)
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.")
|
|
|