[Python] Top-left of matplotlib isn’t showing expected axes coordinates

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    The coordinates for the top left is not (0, 2) like it should be, instead it’s offset by a small amount in the x-axis (0.25 units). Why is that? How can I fix it?

    [​IMG]

    import matplotlib

    matplotlib.use("TkAgg")
    import matplotlib.pyplot as plt


    fig, ax = plt.subplots(figsize=(6, 8), facecolor="black", dpi=100)

    ax.set_xlim(0, 2)
    ax.set_ylim(0, 2)
    ax.set_aspect("equal", adjustable="datalim")

    plt.axis("off")
    plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
    plt.show()

    Continue reading...

Compartilhe esta Página