I'm using two related packages that generate plots I want to overlay for comparison. I call a method called plot_spectro from each package which plots to plt. Then I must do plt.legend() and plt.show() to see them. What happens is two plots with the same data ranges appear, but I would like to overlay (superimpose) them.
import matplotlib.pyplot as plt
s.plot_spectro(xaxis=x, yaxis=y)
plt.xlim(-6,2)
plt.ylim(-2.5,2.5)
o1.plot_spectro(xaxis=x, yaxis=y, color='b')
plt.xlim(-6,2)
plt.ylim(-2.5,2.5)
plt.legend()
plt.show()