Markers have compression artifacts #8284

Closed
fkbreitl opened this Issue Mar 13, 2017 · 5 comments

Comments

Projects
None yet
3 participants

fkbreitl commented Mar 13, 2017 edited

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

Owner

tacaswell commented Mar 13, 2017

Why do you think these are compression artifacts?

What else?

fkbreitl commented Mar 13, 2017 edited

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.

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

Owner

tacaswell commented Mar 14, 2017

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

tacaswell closed this Mar 14, 2017

tacaswell added the Duplicate label Mar 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment