X Tutup
Skip to content

ax.vlines adds unwanted padding, changes ticks #6953

@myyc

Description

@myyc

Hi. I understand this is a cosmetic feature and it's often a good thing (I'm all for aesthetics) but sometimes this functionality comes at the expense of other stuff

from matplotlib import pyplot as plt

f, (a1, a2) = plt.subplots(1, 2)
a1.plot([1.1,2,2.9])
a2.plot([1.1,2,2.9])
a2.vlines(1, *a2.get_ylim())

This code produces two plots, the right one has some padding on top (and completely different ticks). There should be an option to disable it. Not sure whether it has to do with the hold feature (which is True by default so if that's the issue then it's ignored).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup