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

Home » Public Forums » archive » filling area for an XY plot
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: filling area for an XY plot [message #90041 is a reply to message #90039] Mon, 19 January 2015 18:51 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Monday, January 19, 2015 at 12:52:28 PM UTC-7, mkmv...@gmail.com wrote:
> I would like to fill an area for an XY plot. I have altitude on Y axis and percentage difference on X axis. I have three lines plotted, the center line being the mean value and the other two lines are +/_ 1 standard deviation. I would like to plot the standard deviation from mean as a shaded area. I tried to use polyfill but was no luck. Any help will be appreciated.
> Thanks,
> Mahesh

Example from the POLYGON function:

data = RANDOMU(s,81)*15-5
upper = data + RANDOMU(s,81)*2 + 6
bottom = data - RANDOMU(s,81)*3 - 7
year = INDGEN(81) + 1930
key = 1942

p = PLOT(year, data, XRANGE=[1930,2010], YRANGE=[-15,20], $
YTITLE='Soil Heat Accumulation [MJ m$^{-2}$]', THICK=2)
poly = POLYGON([year,reverse(year)], [upper,reverse(bottom)], $
[REPLICATE(-0.01,162)], /DATA, /FILL_BACKGROUND, $
FILL_COLOR="light steel blue")


Cheers,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Colors for the Color Blind
Next Topic: finite function

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

Current Time: Wed Oct 08 11:42:29 PDT 2025

Total time taken to generate the page: 0.00453 seconds