Skip to content

Markers have compression artifacts #8284

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
fkbreitl opened this issue Mar 13, 2017 · 5 comments
Closed

Markers have compression artifacts #8284

fkbreitl opened this issue Mar 13, 2017 · 5 comments

Comments

@fkbreitl
Copy link

fkbreitl commented Mar 13, 2017

Bug report

Markers appear smeared and not clear

  • When I plot markers with pyplot they show compression artifacts even when I save them as PNG.

Code for reproduction

#!/usr/bin/env python                                                          

import numpy as np
import matplotlib.pyplot as plt

x = [1, 2, 3]

plt.errorbar(x, x, xerr=.05, yerr=.02, fmt='+')

plt.savefig('test.png')

Actual outcome

See image attached.

Expected outcome

I want markers without smearing or interpolation as clear as the resolution permits.

Matplotlib version

  • Matplotlib version 2.0.0, Python 2.7.13 and Debian 9.
  • Matplotlib installed with pip

test

@tacaswell
Copy link
Member

Why do you think these are compression artifacts?

@fkbreitl
Copy link
Author

What else?

@fkbreitl
Copy link
Author

fkbreitl commented Mar 13, 2017

I just realize now, that the asymmetry of the marker is caused by the fmt='+'. If I replace this by linestyle='', then the smearing becomes symmetric. I think then it is displayed correctly.
I am still surprised by the asymmetry when using fmt='+' but since it can be avoided it doesn't seem critical.

@QuLogic
Copy link
Member

QuLogic commented Mar 13, 2017

fmt='+' means each value gets a plus marker, then the errorbars are drawn on top. If you want no markers, then use fmt='none', but there's currently a bug there... #8163

@tacaswell
Copy link
Member

This is a duplicate of #3400 due to fractional pixel offests between the lines used for the error bars and the marker.

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