Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
> 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. > > "IDL Wizard of the Year" honors to one who has the solution. > > -- > ,__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 Look up contour in the IDL Reference Manual (pp. 1-44 thru 1-50). The following example shows just a few of the keywords available to contour. z = shift(dist(40), 20, 20) z = exp(-(z/10)^2) contour, z, c_orientation=[30, 60, 90, 120, 150], nlevel=8,c_thick=2, $ c_linestyle=[0,2] -Matt Rice
In article <2tsgrh$5im@csnews.cs.Colorado.EDU>, rice@alumni.cs.colorado.edu (Matthew Rice) writes: > Look up contour in the IDL Reference Manual (pp. 1-44 thru 1-50). The > following example shows just a few of the keywords available to contour. > > z = shift(dist(40), 20, 20) > z = exp(-(z/10)^2) > contour, z, c_orientation=[30, 60, 90, 120, 150], nlevel=8,c_thick=2, $ > c_linestyle=[0,2] > > -Matt Rice My mailbox is full of these quotes from the reference manual, but this method does not provide a visually pleasing set of dot patterns. I need a good variety of patterns that look appealing in postscript. The above method does fine for lines, and I solute you for locating it. -- ,__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
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
>>>> > "Andy" == Andrew F. Loughe <andy@pong.gsfc.nasa.gov> asks: |> 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. |> >>>> > "David" == David Landers <landers@tsunami.dseg.ti.com> responds: David> Get PV-WAVE. :) Use POLYCONTOUR, Pattern=whatever David> Of course, POLYCONTOUR doesn't handle open contours, so you have David> to use the 'surround your data' trick (v4.2 User's Guide, David> Chapter 4). David> POLYCONTOUR does have some trouble with some kinds of data (due David> to assumptions it makes about which contour regions are "on top" David> or something like that. Of course, IDL has polycontour as well, so if you can get at the contours, you can use this approach there as well. A while ago, I posted a hacked version of polycontour for PV-Wave and IDL which allows a choice of user-specified fill pattern, and which closes open contours without having to resort to the data-distorting "surround your data" trick. It also fills the contours in the correct order so the above mentioned "trouble with some kinds of data" is eliminated (e.g. it will plot a volcano-like function without losing the dip in the middle). If anybody is interested in a copy, send me e-mail. If there is enough interest, I'll post it again. Phil -- ------------------------------------------------------------ --------- Philip Sterne | sterne@dublin.llnl.gov Lawrence Livermore National Laboratory | Phone (510) 422-2510 Livermore, CA 94550 | Fax (510) 422-7300