[Python] Making a polygon with Python matplotlib

Discussão em 'Python' iniciado por Stack, Setembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I tried to make a single polygon with the following code, but it made two?

    import matplotlib.pyplot as plt

    x = [4, 1, 2]
    y = [1, 2, 1]
    z = [0, 2, 1]

    plt.fill(x, y, z)
    plt.show()


    This code displays two polygons in different colors, but I want one polygon with a single, unified color.

    Continue reading...

Compartilhe esta Página