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

Home » Public Forums » archive » How to plot continuously shaded area?
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
How to plot continuously shaded area? [message #25068] Fri, 11 May 2001 11:40
bleau is currently offline  bleau
Messages: 24
Registered: November 1993
Junior Member
Hello. I've been tasked with making a smooth variation in color, from white
through yellow, orange, into red, as part of a plot. The plot currently has a
white background, black axes, a grid, and black data points (lines connecting
them). I draw these using a combination of the commands plot, oplot, and axis.

The request if for the upper part of the plot, starting about halfway up the Y
axis, to go gradually from white through the above mentioned colors into red by
the time it reaches the top of the plotting area.

I know how to load the color table with tvlct, and have used this in the past
(with the color keyword on oplot) to draw plots of different data sets in the
same plotting region. I also know about polyfill, which I've used before to
shade rectangles. However, polyfill seems to shade the entire rectangle with
only a single color.

Am I doomed to drawing multiple rectangles, each with a different color index,
and manually filling the color table with slightly different triples of R,G,B,
to accomplish my goal? Or is there another way I don't yet know about? I saw
there are shading routines, but these appear overpowering (3-D stuff I don't
need). Hints appreciated.

I'm running IDL V5.2 on OpenVMS AXP V7.1-2. I'm writing to the Z buffer, and
will eventually write the resultant plot to a GIF file (for now). Thanks.

Lawrence Bleau
University of Maryland
Physics Dept., Space Physics Group
301-405-6223
bleau@umtof.umd.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Chopping up a string
Next Topic: Re: How to plot continuously shaded area?

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

Current Time: Thu Oct 09 21:04:54 PDT 2025

Total time taken to generate the page: 0.00622 seconds