Re: stippling or cross hatching in contour plot [message #56148] |
Fri, 05 October 2007 14:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
MA writes:
> I have a couple of maps (contour plots with filled, colored contours)
> that I'd like to overlay with stippling or hatching without blocking
> the color underneath. Does anybody have a suggestion on this problem?
> I'm trying to mark areas with high or low significance in the plot. A
> simple contour doesn't work very well since the data is pretty noisy,
> and I end up getting a lot of lines.
>
> The only way to hatch things that I've found is with the c_orientation
> keyword in the contour procedure. My problem with that is that it will
> always hatch above the topmost defined level. I.e. if I want to hatch
> between values of 25 and 50, and set levels=[25,50], it will hatch
> above 50 as well. Also, it erases the colors underneath the hatched
> portions.
As usual with IDL contours, you can't let IDL choose the contours
for you. You have to choose them yourself, and the lowest one better
be conincident with the MIN(data) if you expect to make sense of
what you are doing. :-)
http://www.dfanning.com/tips/nlevels.html
I don't see how it can erase the colors underneath, unless
you forget to use the NOERASE keyword. But the hatching has
no choice but to be drawn on top of the color, assuming you
have drawn the colorsa before the hatching. If it seems
to be erasing, maybe the hatching is too dense. You could
lighten up on that.
> Or should I use polyfill instead? I've done stippling before by
> defining a pattern for polyfill. I think this would cover over the
> underlying color contours, too. Unless I redefine the pattern in each
> box with the correct color...
In direct graphics, POLYFILL and Contour just replace pixels,
they don't "cover" anything up. Perhaps you could create
an example of what you mean.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|