8000 BUG: bar deals with bytes and string x data in different manners, both that are unexpected · Issue #7215 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
BUG: bar deals with bytes and string x data in different manners, both that are unexpected #7215
Closed
@NelleV

Description

@NelleV

And messes quite badly…

import matplotlib.pyplot as plt
import numpy as np

types = np.array([b"1.0", b"11.0", b"6.0"])
counts = np.array([544, 631,  55])
fig, axes = plt.subplots(ncols=2)
axes[0].bar(types, counts)

types = np.array(["1.0", "11.0", "6.0"])
counts = np.array([544, 631,  55])
axes[1].bar(types, counts)

yields (on matplotlib

mpl_bug_bar_1

on matplotlib version "2.0.0b4+2254.gf544a83"

Neither of those plots are correct.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0