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

Commitc15f5a6

Browse files
committed
changed example to OO format
1 parente0415f9 commitc15f5a6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎examples/pylab_examples/log_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
i"""
22
========
33
Log Axis
44
========
@@ -10,10 +10,13 @@
1010
importmatplotlib.pyplotasplt
1111
importnumpyasnp
1212

13+
fig,ax=plt.subplots()
14+
1315
dt=0.01
1416
t=np.arange(dt,20.0,dt)
1517

16-
plt.semilogx(t,np.exp(-t/5.0))
17-
plt.grid(True)
18+
ax.semilogx(t,np.exp(-t/5.0))
19+
ax.grid()
1820

1921
plt.show()
22+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp