Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pdf backend bug with logarithmic plots #804

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
jkseppan opened this issue Mar 28, 2012 · 2 comments
Closed

pdf backend bug with logarithmic plots #804

jkseppan opened this issue Mar 28, 2012 · 2 comments
Assignees
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: confirmed bug

Comments

@jkseppan
Copy link
Member

Reported by "sanders" at http://thread.gmane.org/gmane.comp.python.matplotlib.general/30305

The second pdf file produced by the following script looks wrong, as if one corner of each histogram bar is shifted to the right. The png file looks correct, and so does the first pdf file (produced with log=False).

import matplotlib.pyplot as plt
import numpy as np

data = np.random.normal(size=1000)

### correct pdf

fig = plt.figure()
ax = fig.add_subplot(111)

ax.hist(data, fill=False, log=False)

fig.savefig('plot1.pdf', format='pdf')
fig.savefig('plot1.png', format='png')

### wrong pdf

fig = plt.figure()
ax = fig.add_subplot(111)

ax.hist(data, fill=False, log=True)

fig.savefig('plot2.pdf', format='pdf')
fig.savefig('plot2.png', format='png')
@ghost ghost assigned jkseppan Mar 28, 2012
@jkseppan
Copy link
Member Author

Happens with svg too.

@jkseppan
Copy link
Member Author

Fix merged into v1.1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: confirmed bug
Projects
None yet
Development

No branches or pull requests

1 participant