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,

[Matplotlib-users] I need to force the "rounding" of x axis limits

2015-04-06 Thread giacomo boffi
INTRO = please consider the following code (I'm trying to draw a timeline) 1 from matplotlib import pyplot, patches 2 fig = pyplot.figure() 3 ax = fig.add_subplot('111') 4 ax.add_patch(patches.Rectangle((1933,0.25), 73, 0.5)) 5 pyplot.show() that gives me a plot with the x axis that goes fro