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

Home » Public Forums » archive » Direct vs Function Graphics Contour Plots
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
Direct vs Function Graphics Contour Plots [message #77460] Wed, 07 September 2011 16:18
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have been doing some experiments to see if I can figure
out how Function Graphics work today.

One of the things I noticed right off the bat is how
different the contouring algorithms are. I realize that
there are MANY right answers for where a contour line
should go, but even so, I was surprised by this.
The details of the plots are interesting!

Here is a program you can run to produce random data
sets that are then contoured with cgContour and
the Contour function. Run the program with the LABEL
keyword set, if you want to see the contour lines
labeled. Notice how many lines are labeled upside
down!

;********************************************************
PRO ContourPlots, LABEL=label

; Create a simple, random dataset for contouring:
data = RANDOMU(-3L, 9, 9)

; Set the contour levels.
levels =[0.05, 0.1, 0.15, 0.2, 0.3, 0.44, 0.6, 0.75]

; cgContour
cgWindow, WXSIZE=500, WYSIZE=400
cgCONTOUR, data, LEVELS=levels, LABEL=Keyword_Set(label), /WINDOW

; Contour function.
w = Window(DIMENSIONS=[500, 400])
ctr=contour(data, C_VALUE=levels, AXIS_STYLE=2, /CURRENT)
IF Keyword_Set(label) THEN ctr.C_LABEL_SHOW=Replicate(1,8)

END
;********************************************************

A couple of things I can't figure out. (1) Is there a
way to make the contour labels smaller than the text
labels for the Contour()? If I set FONT_SIZE=7, then
*everything* is make that size. (2) Where does one go
to figure out what properties can be changed? The on-line
help really does seem hopeless for these function graphics
commands. (3) How would you position the Window() next
to the cgWindow?

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: Cool animated map. Not IDL per se. But cool!
Next Topic: Re: ENVI_CONVERT_FILE_MAP_PROJECTION processing times

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

Current Time: Wed Oct 08 13:37:43 PDT 2025

Total time taken to generate the page: 0.00507 seconds