[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: circle plot symbol

Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:
> refik@rsmas.miami.edu (Refik Orhun) writes:
> > Hi Folks,
> > 
> > First of all, you have quite an impressive news group.  
> > Well, I Have a simple question.  How do I code a circle as a symbol in a
> > plot ?  All the symbols in my plots so far are squares, diamonds and
> > triangles, i.e. codes 2, 3, 4, etc...
> > 
> > Can anybody tell me the number or code for a "simple circle" to use
> > in PSYM= ?
> I don't think a circle symbol exists, but I'm sure I will be
> corrected.  You can use the following procedure to define a circle as
> the "user" symbol, symbol 8.  You call it either as plain "circsym" or
> as "circsym, /filled" to get a filled circle.  Then you can say,
> "plot, ..., psym=8"
> pro circsym, _EXTRA=extra
>   theta=findgen(26)*0.251327412
>   usersym, cos(theta), sin(theta), _EXTRA=extra
> end
> I believe somebody has a big library of these kinds of user-defined
> symbols.

The problem with this solution (and I've used it myself)
is that as often as not the "circles" show up as ellipses. :-)

For a really good circle procedure, I like to use TVCIRCLE
from the NASA Goddard library. It does the data coordinate
correction for you so that circles always show up as circles.
You can read more about circles in this article on my web



David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155