Re: [Matplotlib-users] Artifacts when saving as PDF

2015-04-12 Thread Jouni K Seppänen
Thanks for the report, I turned it into a github issue: https://github.com/matplotlib/matplotlib/issues/4331 -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with t

Re: [Matplotlib-users] Artifacts when saving as PDF

2015-04-07 Thread Steven Boada
Hi Tom, Thanks for your help. interpolation='nearest' doesn't produce any problems. I'm currently using TkAgg, and I checked with a buddy of mine, using MacOSX backend. Neither of us see any problems using interpolation='nearest'. He is using an older version of MPL which doesn't let him use

Re: [Matplotlib-users] Artifacts when saving as PDF

2015-04-07 Thread Thomas Caswell
This probably should be made into an issue on github as this is clearly a bug. On further consideration, the fact that in my example the bad pixels show up only on the edge and are not symmetric makes me think that my original suggestion is wrong. Does `interpoltation='nearest'` work any better?

Re: [Matplotlib-users] Artifacts when saving as PDF

2015-04-07 Thread Steven Boada
Thomas, Thanks for the smaller example. I would have come up with one, but I wasn't sure what was causing it to begin with. Is there anything to be done to prevent this? Just use another backend? Steven On 4/6/15 8:47 PM, Thomas Caswell wrote: > This is probaly due to issues with not all of th

Re: [Matplotlib-users] Artifacts when saving as PDF

2015-04-06 Thread Thomas Caswell
This is probaly due to issues with not all of the vector backends supporting alpha gracefully. This can be reproduced more simply by x, y = np.ogrid[-5:5:.1, -5:5:.1] dd = np.exp(-(x**2 + y**2)) dd[dd < .1] = np.nan fig, ax = plt.subplots() ax.imshow(dd, interpolation='none', cmap='gray_r') plt.

[Matplotlib-users] Artifacts when saving as PDF

2015-04-06 Thread Steven Boada
Getting some strange artifacts when I save a figure as a PDF in matplotlib. Here are some screen shots. PDF and PNG . Any idea why that is happening? Here is (most of) the source code that makes the plot. I stripped out the data generation,