Skip to content

Frame around colorbar doesn't use closepath (in PDF renderer at least) #2864

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

Closed
mojca opened this issue Mar 4, 2014 · 3 comments
Closed

Comments

@mojca
Copy link

mojca commented Mar 4, 2014

The frame around colorbar (a thin black line) seems to be draw from lower left corner around all four edges, but without closing the line when coming back to lower left corner. This is only visible when thick linewidths are used or under a large magnification.

Yet worse, the frame around the plot itself is composed of four disjoint lines (it looks as if linecaps are "butt" rather than "round" or "square"), so it looks as if tiny little squares have been cut in all the four corners, like the lower left corner on the second image here:

http://studio.imagemagick.org/RMagick/doc/ex/rvg_linejoin.gif

(Image is taken from http://studio.imagemagick.org/RMagick/doc/rvgstyle.html)

@efiring
Copy link
Member

efiring commented Mar 4, 2014

Please supply minimal code examples that illustrate the problems, and specify what is the latest mpl version you have tested. At least the first of the things you mention sounds familiar, and I think it was fixed--but maybe not.

@mojca
Copy link
Author

mojca commented Mar 4, 2014

I'm using matplotlib 1.3.1. (I need to find a way how to easily replace that with a newer version.)

A minimal example to reproduce disjoint lines is the following:

import matplotlib
import matplotlib.pyplot as plt
matplotlib.rcParams['axes.linewidth'] = 10

plt.imshow([[1,2],[2,1]])
plt.colorbar()
plt.savefig('test.pdf')

test

Alternatively omit the first and third line and magnify. Look at the edges of the plot and colorbar.

I'm aware that doing it properly for the main plot could be a bit tricky given that the user can probably switch individual lines on or off. Fixing the colorbar should be straightforward at least.

@efiring
Copy link
Member

efiring commented Mar 5, 2014

@mojca, thank you. Both problems are fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants