plotting an array with gaps

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?

thanks,

Martin

···

--
View this message in context: http://old.nabble.com/plotting-an-array-with-gaps-tp29257116p29257116.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

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

···

On Sat, Jul 24, 2010 at 4:26 PM, mdekauwe <mdekauwe@...287...> 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?