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)