You can use a numpy masked array, and mask the values that you don't 
want to plot.  Or you can use a normal numpy array and set the missing 
values to numpy.nan.  (There seem to be a few side cases where the 
second option doesn't do what you would expect in 0.91.2, but AFAIK it 
works in recent revisions of the SVN trunk.)

In either case, you will still need to assign dates to correspond to 
those "missing" values.  See masked_demo.py for an example (which 
doesn't use dates, but the concepts are the same).

Cheers,
Mike

Lucas Di Pentima wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> 
> I'm starting with matplotlib, using it to build a performance monitor
> web application.
> 
> The plots I'm using mostly are date based graphs, what's the best way to
> go when I have to plot some data that have gaps inside the date ranges?
> The default behaviour is to just connect the last known value with the
> first one after the gap and I would prefer that the graph simply don't
> graph anything in that range.
> 
> Thanks in advance
> - --
> Lucas Di Pentima - http://lucas.di-pentima.com.ar
> GnuPG Public Key:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6AA54FC9
> Key fingerprint = BD3B 08C4 661A 8C3B 1855  740C 8F98 3FCF 6AA5 4FC9
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
> iD8DBQFHjKg4j5g/z2qlT8kRAtc7AKCORvzHbT8vy5os2TfzgttzrgIycACdE2dH
> Rj0iCiSnVZMB3rdnFMWbBcQ=
> =0v0+
> -----END PGP SIGNATURE-----
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to