I runned my code on VSCode.
import matplotlib.pyplot as plt # create and show first figure plt.plot([1, 2, 3], [4, 5, 6]) plt.show() # modifies the graph and displays it again plt.title('Updated Plot') plt.show() # clears the current drawing plt.clf() # creates and displays a second graphic plt.plot([4, 5, 6], [1, 2, 3]) plt.show()
The outputs are figures I upload.
By the way, the other weird thing is that the scale on the coordinate axis in the third figure is reversed.
Who can tell me a way to avoid it?
[figure1](https://i.stack.imgur.com/16OxA.png)
The outputs are on the details.