Skip to content

Commit c15f5a6

Browse files
committed
changed example to OO format
1 parent e0415f9 commit c15f5a6

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
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()
22+

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