plotting lines with shaded / transparent region for standard deviation

hi all,

is there a way in matplotlib to plot lines with errorbars, e.g. using errorbar(…) but instead of lines just have shaded, partly transparent regions that represent the error bars? people often use this to show confidence intervals or error bars… an example is here:

http://eva.nersc.no/vhost/arctic-roos.org/doc/observations/images/ssmi1_ice_ext.png

where the black line has shaded grey bands around. i’d like to plot something like this but have the band be partly transparent.

is there a way to do this? thank you.

I use fill_between for this -- draw the line with "plot" and the
shaded region with "fill_between". You can specify the alpha on the
fill_between call:

  http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between_demo.html
  http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.fill_between

JDH

···

On Wed, Aug 5, 2009 at 9:40 AM, per freem<perfreem@...287...> wrote:

hi all,

is there a way in matplotlib to plot lines with errorbars, e.g. using
errorbar(...) but instead of lines just have shaded, partly transparent
regions that represent the error bars? people often use this to show
confidence intervals or error bars... an example is here:

http://eva.nersc.no/vhost/arctic-roos.org/doc/observations/images/ssmi1_ice_ext.png

where the black line has shaded grey bands around. i'd like to plot
something like this but have the band be partly transparent.