Skip to content

bar / hist : gap between first bar and other bars with lw=0.0 #4602

@damiendr

Description

@damiendr

I like to make solid bar plots without lines around each bar, eg:

plt.hist(data, fc="gray", lw=0.0, alpha=0.5)

Problem: the first bar does not exactly line up with the other bars. There is a slight misalignment visible on the right and bottom edges. Depending on the window size this shows either as a white gap or a darker overlap (visible because alpha=0.5).

The other bars are all properly lined up.

Confirmed both in the notebook inline mode and the QT backend on OSX.
matplotlib.__version__ = '1.4.3'

Steps to reproduce:

import matplotlib.pylab as plt
import numpy as np
plt.figure()
plt.hist(np.random.uniform(0.0, 1.0, size=1000), fc="gray", lw=0.0, alpha=0.5)
plt.show()

Then resize the window and observe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy