Skip to content

Commit 0ac0122

Browse files
authored
Merge pull request #8886 from dmgt/update_example_logtest
Update pylab example to OO format
2 parents 777489a + cf40b7c commit 0ac0122

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
import matplotlib.pyplot as plt
1111
import numpy as np
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy