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

Errorbar caps missing in master when saving to PDF #4239

Closed
u55 opened this issue Mar 18, 2015 · 1 comment
Closed

Errorbar caps missing in master when saving to PDF #4239

u55 opened this issue Mar 18, 2015 · 1 comment

Comments

@u55
Copy link
Contributor

u55 commented Mar 18, 2015

Hi matplotlib developers,

While working with master, I discovered that the errorbar caps are sometimes missing when saving a figure to PDF. Here is a minimal working example:

import numpy as np
import matplotlib.pyplot as plt

N = 6

plt.figure()
# Caps are drawn
plt.errorbar(np.arange(N),
             np.ones(N),
             np.ones(N),
             )
# Caps are missing
plt.errorbar(np.arange(N+1),
             np.ones(N+1) + 4,
             np.ones(N+1),
             )
plt.xlim(-1,N+1)
plt.ylim(-1,7)
plt.savefig('bug.pdf')

Tested with python 2.7 in Linux with matplotlib master. The bug only shows up in master, version 1.4.3 is working correctly. Strangely, this bug does not show up in other vector backends, such as svg, eps, or ps. Stranger still, the appearance of the errorbar caps seems to depend on the number of points that are being drawn. In the above example, 6 points is the magic number to see caps, while the caps are missing if the arrays are extended to 7 points.

As always, thanks for the help.

@tacaswell tacaswell added this to the next point release milestone Mar 18, 2015
@mdboom mdboom self-assigned this Mar 18, 2015
@mdboom
Copy link
Member

mdboom commented Mar 18, 2015

I think this was introduced by #4197. I should have a fix shortly.

@mdboom mdboom closed this as completed in 0c8c640 Mar 18, 2015
tacaswell added a commit that referenced this issue Mar 18, 2015
Fix : Don't include scientific notation in path strings

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

No branches or pull requests

3 participants