On Thu, Feb 11, 2010 at 4:58 PM, John Hunter <jdh2...@gmail.com> wrote: > On Thu, Feb 11, 2010 at 9:43 AM, Geoff Bache <geoff.ba...@jeppesen.com> wrote: >> >> Hi all, >> >> I'm trying to generate graphs from my test results, with regions >> coloured with succeeded and failing tests. It nearly works, but I have >> the following problem. I am providing the data with fill_between, which >> returns PolyCollection objects which cannot be provided to a legend. So >> I use the "proxy artist" trick, as described here >> >> http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend >>
> The only reason fill_between uses a PolyCollection is to support the > "where" keyword argument for non-contiguous fill regions, which you do > not appear to be using. Actually, not using it wasn't out of choice. I couldn't figure out how to make it stop plotting at one point at start again at the next. In my example, is there a way to plot the red regions using a single call and "where"? I tried this where = [False, True, True, True, False, True] axessubplot4.fill_between([0, 1, 2, 3, 4, 5], [2, 2, 2, 8, 8, 15], [2, 2, 4, 8, 8, 18], where=where, color='#FF3118', linewidth=2, linestyle='-') but that fails to plot either to or from point 4, whereas actually I just want it to leave out the region between points 3 and 4 (where the values are equal) Regards, Geoff ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users