Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5448a1f commit b957b96Copy full SHA for b957b96
examples/shared_axis_across_figures.py
@@ -0,0 +1,26 @@
1
+"""
2
+connect the data limits on the axes in one figure with the axes in
3
+another. This is not the right way to do this for two axes in the
4
+same figure -- use the sharex and sharey property in that case
5
6
+import numpy
7
+from pylab import figure, show
8
+
9
+fig1 = figure()
10
+fig2 = figure()
11
12
+ax1 = fig1.add_subplot(111)
13
+ax2 = fig2.add_subplot(111)
14
15
+ax1.plot(numpy.random.rand(100), 'o')
16
+ax2.plot(numpy.random.rand(100), 'o')
17
18
+ax1.sharex_foreign(ax2)
19
+ax2.sharex_foreign(ax1)
20
21
+ax1.sharey_foreign(ax2)
22
+ax2.sharey_foreign(ax1)
23
24
25
26
+show()
0 commit comments