Use the fill function to make shaded regions of any color tint. Here is an example.

   1 
   2 from pylab import *
   3 
   4 x = arange(10)
   5 y = x
   6 
   7 # Plot junk and then a filled region
   8 plot(x, y)
   9 
  10 # Make a blue box that is somewhat see-through
  11 # and has a red border. 
  12 # WARNING: alpha doesn't work in postscript output.... 
  13 fill([3,4,4,3], [2,2,4,4], 'b', alpha=0.2, edgecolor='r')

Cookbook/Matplotlib/ShadedRegions (last edited 2007-12-06 20:25:06 by jesrl)