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

Home » Public Forums » archive » Re: plot and contour inconsistency
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: plot and contour inconsistency [message #83553 is a reply to message #83551] Sun, 10 March 2013 13:31 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matthew Argall writes:

>
>> This is kind of an odd way to write a program. What are you hoping to
>> accomplish by doing this?
>
> There is a program that makes survey plots of satellite data that has a window that allows me to switch between time periods. I wanted to be able to change a few of the default attributes of the plots for when the range of the data changes by a lot. Also, the bad values are not always weeded out, so there is often a few -1e-31 that throw everything off.
>
> In order to set the default attributes, I filled a structure with a small set of keywords accepted by plot then made a setProperties method to change them. Every time the plot is updated, PLOT now gets called something like
>
> PLOT, x, y, _EXTRA=extra
>
> where "extra" is the structure of properties I want to change.
>
> In for this to work, though, I have to default to the IDL defaults. MAX_VALUE and MIN_VALUE do not have defaults, so I chose +/- !values.f_infinity. Later, I can changed them so that the -1e-31's do not show up.

Ah, then let me suggest a different way of doing this. The
cgGraphicsKeywords object can keep track of of the "graphics keywords"
required by Plot, Contour, etc. But, the nice thing about this object is
that when asked for the keywords, if a keyword hasn't been defined, then
the keyword value for that keyword will be an undefined variable. In
other words, you don't *have* to define a default value for each and
every keyword. This is because all the keywords are stored as pointers,
and a pointer can return an undefined variable.

I use this to keep track of plot keywords in cgZPlot, for example. It
works really well. This was the first step required to turn the Coyote
Graphics routines into objects. The cgZPlot program was the first proof
of concept program. Since then, I haven't had much time to work on it,
and no one seems to be clamoring for Coyote Graphics objects, so I
haven't worried too much about it. But, you might be able to use to good
effect. :-)

See the DrawPlot method in cgZPlot__Define to see how I use it.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: issue with CMSAVE
Next Topic: plot and contour inconsistency

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

Current Time: Fri Oct 10 08:20:44 PDT 2025

Total time taken to generate the page: 0.31597 seconds