pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/numpy/numpy-tutorials/commit/60c54960803c8c39126781af0ec237f7026d528d

gin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-95af332f763e4560.css" /> MAINT: Use subplots in fractal tutorial. · numpy/numpy-tutorials@60c5496 · GitHub
Skip to content

Commit 60c5496

Browse files
committed
MAINT: Use subplots in fractal tutorial.
1 parent 47effec commit 60c5496

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

content/tutorial-plotting-fractals.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ mesh = x + (1j * y)
219219
220220
output = divergence_rate(mesh)
221221
222-
fig = plt.figure(figsize=(5, 5))
223-
ax = plt.axes()
222+
fig, ax = plt.subplots(figsize=(5, 5))
224223
225224
ax.set_title('$f(z) = z^2 -1$')
226225
ax.set_xlabel('Real axis')
@@ -273,8 +272,7 @@ We will also write a function that we will use to create our fractal plots:
273272
```{code-cell} ipython3
274273
def plot_fractal(fractal, title='Fractal', figsize=(6, 6), cmap='rainbow', extent=[-2, 2, -2, 2]):
275274
276-
plt.figure(figsize=figsize)
277-
ax = plt.axes()
275+
fig, ax = plt.subplots(figsize=figsize)
278276
279277
ax.set_title(f'${title}$')
280278
ax.set_xlabel('Real axis')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

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