Skip to content

extra box on histogram plot with a single value #6959

Closed

Description

@idavydov

On a histogram with a single value repeated for 100 times I get an extra tiny box.
The code to reproduce the issue:

from matplotlib import pylab as plt
plt.hist([33]*100)
plt.show()

Here you can see a black line next to 32.6.
figure_1

  • Matplolib: 1.5.1-1ubuntu1 (from repository), Python 2.7.12, Ubuntu 16.04.1
  • The same problem can be reproduced in python 3.5.2.

Activity

  1. LindyBalboa commented on Aug 19, 2016

    @LindyBalboa
    Contributor

    This one appears to be fixed in the master branch. Python 3.5.2 on Ubuntu 16.04.

  2. WeatherGod commented on Aug 19, 2016

    @WeatherGod
    Member

    "fixed"... probably hidden due to changes in style. I don't think the black
    outlines happen in the default 2.0 styles?

    On Fri, Aug 19, 2016 at 8:07 AM, Conner Phillips notifications@github.com
    wrote:

    This one also appears to be fixed in the master branch. Python 3.5.2 on
    Ubuntu 16.04.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #6959 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AARy-INzYw3JZvMtPEmbaBnjBjr9ofUTks5qhZyUgaJpZM4JoTpp
    .

  3. jenshnielsen commented on Aug 19, 2016

    @jenshnielsen
    Member

    @WeatherGod Yes I think you are right this is the black edge rendered incorrectly around the first bin. I think this is essentially a duplicate of #4212

  4. idavydov commented on Aug 19, 2016

    @idavydov
    Author

    This bug is still present in the latest git version (2cdb5aa).

    It's only visible if default theme is used (probably related to outline shown/hidden):

    from matplotlib import pylab as plt
    plt.style.use('classic')
    plt.hist([33]*100)
    plt.show()

    figure_1_bad2

  5. jenshnielsen commented on Aug 19, 2016

    @jenshnielsen
    Member

    This was done as a fix for #408 In this case I think the cure is worse than the original problem so we should probably revert #408, I can't reproduce the issue in #408 anyway (perhaps it is specific to the OSX backend which is no more)

  6. added this to the milestone on Aug 29, 2016
  7. tacaswell commented on Aug 29, 2016

    @tacaswell
    Member

    Related to #6887

  8. added a commit that references this issue on Aug 29, 2016
    9a6ec8f
  9. jenshnielsen commented on Sep 6, 2016

    @jenshnielsen
    Member

    Closed by #6887

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions