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

Home » Public Forums » archive » Re: cgplot clobbers user symbols
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: cgplot clobbers user symbols [message #76073] Wed, 18 May 2011 21:46
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
Yeah, it doesn't disturb me that it gets clobbered when you use non-built-in symbol numbers, but I was surprised that it would disappear for built-in ones.

In this case, you probably wouldn't want to - the symbol in question is actually

usersym, [0,1], [0,1]

i.e. a diagonal tick to the upper-right from the plot position. It only makes sense to use because I'm putting it on top of lines that are roughly diagonal the other way, so it nicely marks positions along the line, but I can't imagine anyone using it in any other context.

-Jeremy.
Re: cgplot clobbers user symbols [message #76083 is a reply to message #76073] Wed, 18 May 2011 14:23 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgHistoplot issue
Next Topic: Re: IDL 7.1 to 8.1, workspace migration

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

Current Time: Wed Oct 08 19:39:28 PDT 2025

Total time taken to generate the page: 0.00449 seconds