8000 Integer Categorical Values Not Getting Mapped Correctly · Issue #9336 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Integer Categorical Values Not Getting Mapped Correctly #9336
Closed
@story645

Description

@story645

As @anntzer described in #9318, integer categoricals (even when strings) aren't using the unit mapping and so are being handled incorrectly:

fig, ax = plt.subplots()
ax.set_xlim([-1,2])
ax.set_ylim([0,2])
ax.plot(["!", "0"], [1, 2])

index

ETA: Ok, so the bug is that it's doing an inplace substitution, and casting into a string:

vals[vals=='!'] = 0 # casts into string
vals=='0' # matches everything

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.topic: categorical

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0