I'd like to add multiple plots to a specific subplot with the same axis. So far I managed to do that with by just repeatedly callign plt.[some_plotting_function]
after activating the corresponding plt.subplot(xxx)
like so:
import matplotlib.pyplot as plt
plt.subplot(121)
plt.plot([0, 1], [0, 1], 'o-')
plt.subplot(122)
plt.plot([0, 1], [0,0], 'o-')
plt.subplot(121)
plt.plot([0, 1], [1, 0], 'o-')
plt.show()
Now I get the warning
MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.
It sounds like the same code will behave differently in the future. How will I be able to achieve the same result as with the code above in the future?