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

Skip to content

pdf backend bug with logarithmic plots #804

Closed
@jkseppan

Description

@jkseppan

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

Metadata

Metadata

Assignees

Labels

Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions