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

Commit0ac0122

Browse files
authored
Merge pull request#8886 from dmgt/update_example_logtest
Update pylab example to OO format
2 parents777489a +cf40b7c commit0ac0122

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎examples/pylab_examples/log_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
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()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp