Skip to content

Markers have compression artifacts #8284

Closed

Description

@fkbreitl

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

Activity

  1. tacaswell commented on Mar 13, 2017

    @tacaswell
    Member

    Why do you think these are compression artifacts?

  2. fkbreitl commented on Mar 13, 2017

    @fkbreitl
    Author

    What else?

  3. fkbreitl commented on Mar 13, 2017

    @fkbreitl
    Author

    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.

  4. QuLogic commented on Mar 13, 2017

    @QuLogic
    Member

    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

  5. tacaswell commented on Mar 14, 2017

    @tacaswell
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions