--I want to compare two plots --Since the y-axis scale is different, one is crushed and cannot be seen. ――The magic at that time
dual_plot.py
import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
ax1.plot(data1)
ax2 = ax1.twinx() #Associate two plots
ax2.plot(data2)
plt.show()
――It feels good because the peak position and the step position overlap.
Recommended Posts