Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorbar edges are different in PDF backend #1444

Merged
merged 1 commit into from Nov 1, 2012

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Nov 1, 2012

In a message on matplotlib-users from Andrew Dawson:

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

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')

@ghost ghost assigned mdboom Nov 1, 2012
@dmcdougall
Copy link
Member

I can confirm this with 1.2 on OS X.

@mdboom mdboom merged this pull request into matplotlib:v1.2.x Nov 1, 2012
@pelson
Copy link
Member

pelson commented Nov 2, 2012

This change was reverted. @mdboom do you have a reference to the commit which reverted it?

@mdboom
Copy link
Member Author

mdboom commented Nov 2, 2012

It was the head of v1.2.x, so I just rolled back.

mdboom added a commit to mdboom/matplotlib that referenced this pull request Nov 5, 2012
mdboom added a commit to mdboom/matplotlib that referenced this pull request Nov 6, 2012
mdboom added a commit to mdboom/matplotlib that referenced this pull request Nov 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants