2011/3/10 Søren Nielsen <soren.skou.niel...@gmail.com>: > Is there a way I can get around this without having to search through my > data and remove points that are negative or NaN or INF when the yscale needs > to be log? That would also show an incorrect curve since a line would be > drawn across the points that were removed.. It should rather be gaps in the > line.
You can use masked arrays. Masked values don't get plotted. Sample code (not tested): import numpy.ma as ma # masked arrays module ... mdata = ma.masked_array(data) mdata[mdata <= 0] = ma.masked plot(mdata) Goyo ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users