[Python] Change marker in the legend in matplotlib

Discussão em 'Python' iniciado por Stack, Junho 25, 2025.

  1. Stack

    Stack Membro Participativo

    Suppose that you plot a set of data:

    plt.plot(x,y, marker='.', label='something')
    plt.legend()


    On the display, you will obtain . something, but how do you do to change it to - something, so that the marker that appears in the legend is a line a not a dot?

    Continue reading...

Compartilhe esta Página