[Python] Legend in a specific format

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

  1. Stack

    Stack Membro Participativo

    I am plotting a graph with a legend using the following command:

    K = [1e3,1e4]
    plt.plot(x[:len(y1)], y1, 'o', label=f'Simulation ($K_L$={K:0e})')


    which produces the following graph:

    [​IMG]

    But I want the legend to be in a specific format as presented below:

    KL = 103

    Continue reading...

Compartilhe esta Página