From: Michael D. <md...@st...> - 2012-11-01 13:06:36
|
I've filed an issue for this here: https://github.com/matplotlib/matplotlib/issues/1444 Mike On 10/31/2012 12:20 PM, Andrew Dawson wrote: > Hi all, > > I just noticed that colorbar edges are drawn in white when output in > PDF and black when output in PNG. A small test script is attached > along with the output to show the difference. > > I'd be interested in knowing if others can reproduce this? I'm using > mpl-1.3.x (updated 5 minutes ago) on 64-bit Ubuntu 12.04. > > Cheers, > Andrew > > bug.py > > > import matplotlib.pyplot as plt > import numpy as np > > # dummy data > x = y = np.linspace(-np.pi, np.pi, 50) > X, Y = np.meshgrid(x, y) > Z = np.sin(X) * np.cos(2.*Y) > > # draw a filled contour plot and add a colorbar with drawedges turned on > contours = plt.contourf(x, y, Z) > cb = plt.colorbar(orientation='horizontal', drawedges=True) > > # turn off tick marks so the edges can be seen > for tick in cb.ax.get_xticklines() + cb.ax.get_yticklines(): > tick.set_visible(False) > > # save as a PDF and a PNG > plt.savefig('test.pdf') > plt.savefig('test.png') > |