Centerline between different plot (no subtitles) using matplotlib

Here is my question. I know that there is a simple way to link the axis of another plot if they are subtitles in the same figure:

import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(211) ax2 = fig.add_subplot(212, sharex=ax1) 

But I'm wondering if there is a way to make the same link (when scaling in Figure 1, I get the same scale in Figure 2 on one specific axis) when defining 2 different shapes (I want this graph to be displayed far from each other, so I think I can’t put them in the same drawing ...)

Thanks a lot!

+4
source share
1 answer

You just do the same, but with a different number.

 import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) fig2 = plt.figure() ax2 = fig2.add_subplot(111, sharex=ax1) 
+9
source

All Articles