Re: Contour shading (patterns) [message #2226 is a reply to message #2221] |
Fri, 17 June 1994 15:08   |
landers
Messages: 45 Registered: May 1993
|
Member |
|
|
In article <2tq25i$dhs@paperboy.gsfc.nasa.gov>, andy@pong.gsfc.nasa.gov (Andrew F. Loughe) writes:
|> I post this about every 3 months... does anyone yet have a solution?
|>
|> The problem is to produce a simple contour plot where, instead of filling
|> between the contour lines with different colors, one fills between the
|> contour lines with a specified dot or line pattern.
|>
Get PV-WAVE. :) Use POLYCONTOUR, Pattern=whatever
Of course, POLYCONTOUR doesn't handle open contours, so you have to use the
'surround your data' trick (v4.2 User's Guide, Chapter 4).
POLYCONTOUR does have some trouble with some kinds of data (due to assumptions
it makes about which contour regions are "on top" or something like that.
More generally, you could display your data as an image (REBIN, SMOOTH(?),
BYTSCL, TV). I think you could then have some success with making your plot
device dither.... Yuck
Or use "PLOTS, Psym=whatever" on each point in your data, selecting the Psym
based on the data level....
CONTOUR, data, x, y
sym = bytscl(data, top=6)+1 ; use Psyms 1 thru 7
FOR i=0L, N_elements(data)-1 do $
PlOTS, x(i), y(i), Psym=sym(i)
This doesn't exactly _fill_ your contours, but it's a pretty simple approach.
It has the advantage (or disadvantage, depending on your perspective) of
also indicating where your "real" data points are.
Depending on the relative density of data vs. your display, this could be very
ugly, or quite nice. Maybe CONGRID or REBIN data to get more or fewer data
points for the PLOTS loop.... Or pick better patterns and use USERSYM.
I use this technique to make 'image' plots of random data that I don't want to
regrid. Except I use a BYTSCL'd color rather than Psym, and I don't use the
CONTOUR. It's especially handy for checking out raw data, or comparing
gridder results to the ungridded data.
|> "IDL Wizard of the Year" honors to one who has the solution.
|>
No thanks - not qualified. "PV-WAVE wiz" ? maybe....
|> --
|> ,__o Andrew F. Loughe (Mail Code 971)
|> -\_<, NASA Goddard Space Flight Center phone: (301) 286-5899
|> (*)/'(*) Greenbelt, MD 20771 email: andy.loughe@gsfc.nasa.gov
;Dave
|
|
|