Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb957b96

Browse files
committed
added shared axis demo
svn path=/trunk/matplotlib/; revision=3405
1 parent5448a1f commitb957b96

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
importnumpy
7+
frompylabimportfigure,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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp