Here is my question. I know there is a simple way to link the axis of different plot if they are subplots in the same figure this way :
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212, sharex=ax1)
But I wonder if there is a way to do the same link (when zooming on figure 1, I get the same zoom on figure 2 on one particular axis) when defining 2 different Figures (I want those graph to appear far from each other so I guess that I can't put them in the same Figure...)
Thanks a lot !
You simply do the same thing, but with a different figure.
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111)
fig2 = plt.figure()
ax2 = fig2.add_subplot(111, sharex=ax1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With