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

Home » Public Forums » archive » usersym keywords -- why?
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
usersym keywords -- why? [message #63436] Mon, 10 November 2008 15:04 Go to next message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Hi all,

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.

cheers
chris
Re: usersym keywords -- why? [message #63562 is a reply to message #63436] Tue, 11 November 2008 10:48 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Nov 10, 6:04 pm, Christopher Thom <ct...@oddjob.uchicago.edu>
wrote:
> Hi all,
>
> 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?
>

Well for example, sometimes I want a /FILLed symbol, but I don't want
the whole plot to be a giant filled polygon.
Re: usersym keywords -- why? [message #63565 is a reply to message #63436] Tue, 11 November 2008 08:09 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Fanning schrieb:
> David Fanning writes:
>
>> Thus, I can't get them inside my program. But, that said,
>> I can understand some of Chris's confusion, because the
>> THICK keyword only applies to symbols I can create with
>> USERSYM. (Any symbol where I have to "lift the pen" to
>> draw cannot be created in USERSYM, such as a plus sign
>> or an asterisk.)
>
> I guess I could draw a plus sign and an asterisk without
> lifting my pen, but not today. Too tedious and I have
> other work to do. Extra credit for anyone who works that
> out for me. :-)
>
> Cheers,
>
> David

Hi David

from our icgsym_define_symbols routine

there are some more complex symbols done also by x_digisym
which i can show later.

cheers
Reimar


1: BEGIN ;Plus sign
yarr = [0, 0, 0, -1, 1] * psize
xarr = [1, -1, 0, 0, 0] * psize
fill = 0
END
2: BEGIN ;cross-plus
yarr = [-1, 1, 0, 1, -1,0,1,-1,0,0,0] * psize
xarr = [-1, 1, 0, -1, 1,0,0,0,0,1,-1] * psize
fill = 0
END
3: BEGIN ;point
yarr = [0,0] * psize
xarr = [0,0] * psize
fill = 0
END
4: BEGIN ;Diamond
yarr = [0, -1, 0, 1, 0] * psize
xarr = [1, 0, -1, 0, 1] * psize
END
5: BEGIN ;Triangle
xarr = [-1,0,1,-1]*psize
yarr = [-1,1,-1,-1]*psize
END
6: BEGIN ;Square
yarr = [1, -1, -1, 1, 1] * psize
xarr = [1, 1, -1, -1, 1] * psize
END
7: BEGIN ;Cross
yarr = [-1, 1, 0, -1, 1] * psize
xarr = [1, -1, 0, -1, 1] * psize
fill = 0
END
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFJGa4v5aOc3Q9hk/kRApQ8AJ9GYObTTalmjZ2X4oXJDZpee4OXgACg q4Rl
y18T+1oSJCL5CPiamvUZIYE=
=45Hs
-----END PGP SIGNATURE-----
Re: usersym keywords -- why? [message #63568 is a reply to message #63436] Tue, 11 November 2008 07:20 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Thus, I can't get them inside my program. But, that said,
> I can understand some of Chris's confusion, because the
> THICK keyword only applies to symbols I can create with
> USERSYM. (Any symbol where I have to "lift the pen" to
> draw cannot be created in USERSYM, such as a plus sign
> or an asterisk.)

I guess I could draw a plus sign and an asterisk without
lifting my pen, but not today. Too tedious and I have
other work to do. Extra credit for anyone who works that
out for me. :-)

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL and sqlite
Next Topic: Re: linfit with string time array (x)

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

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

Total time taken to generate the page: 0.00591 seconds