[Python] Why on calling plt.figure() in jupyter notebook, two figure appear?

Discussão em 'Python' iniciado por Stack, Maio 19, 2025.

  1. Stack

    Stack Membro Participativo

    While plotting using matplotlib.pyplot on jupyter notebook, i have noticed that if i call the method

    plt.figure()


    alone(nothing else in the cell) two identical empty figure appear. On the other hand, if i call

    plt.figure()
    plt.plot([1,3,4],[2,7,9])


    then only on figure shows up on the screen. Can anyone explain why this happens?

    p.s. : I am using %matplotlib notebook magic function at the top, which i don't understand very well.

    Continue reading...

Compartilhe esta Página