axvline incorrectly tries to handle unitized ymin, ymax · Issue #12198 · matplotlib/matplotlib · GitHub
Skip to content

axvline incorrectly tries to handle unitized ymin, ymax #12198

Description

@anntzer

After

line = plt.axvline(
    x=.5, ymin=matplotlib.dates.num2date(1), ymax=matplotlib.dates.num2date(1.05))
line.set_clip_on(False)

and panning the axes around, one sees that matplotlib (3.0) converted ymin and ymax to the scalar values 1 and 1.05, which is not correct: ymin and ymax are values relative to the axes bounds and thus intrinsically unitless; passing unitized data to ymin or ymax should result in an error.

The same point likely applies to axhline, axvspan, axhspan.

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions