From: John H. <jd...@gm...> - 2010-07-24 21:31:03
|
On Sat, Jul 24, 2010 at 4:26 PM, mdekauwe <mde...@gm...> wrote: > > Hi, > > Is there a nice way to plot an array where there are say missing days and > you wouldn't want the line to join over these data gaps, i.e. show the gaps. > > E.g. > > 1 4.5 > 2 4.6 > 4 6.7 > 8 5.7 > 9 1.2 > > The only way I could think to get around this involved appending NaNs and > then masking the array, but I wonder if this isn't a tad convoluted? This is probably the easiest way. You could also construct a custom compound path and then use a PathPatch where the facecolor was set to 'None' http://matplotlib.sourceforge.net/users/path_tutorial.html http://matplotlib.sourceforge.net/examples/api/compound_path.html JDH |