Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fdc8a88

Browse files
committedJan 13, 2024
Handle SyntaxWarnings from invalid escape sequences.
1 parent a44f2a1 commit fdc8a88

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

‎content/tutorial-plotting-fractals.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def mandelbrot(mesh, num_iter=10, radius=2):
334334

335335
```{code-cell} ipython3
336336
output = mandelbrot(mesh, num_iter=50)
337-
kwargs = {'title': 'Mandelbrot \ set', 'cmap': 'hot'}
337+
kwargs = {'title': 'Mandelbrot \\ set', 'cmap': 'hot'}
338338
339339
plot_fractal(output, **kwargs);
340340
```
@@ -370,8 +370,6 @@ for deg, ax in enumerate(axes.ravel()):
370370
diverge_len = general_julia(mesh, f=power, num_iter=15)
371371
ax.imshow(diverge_len, extent=[-2, 2, -2, 2], cmap='binary')
372372
ax.set_title(f'$f(z) = z^{degree} -1$')
373-
374-
fig.tight_layout();
375373
```
376374

377375
Needless to say, there is a large amount of exploring that can be done by fiddling with the inputted function, value of $c$, number of iterations, radius and even the density of the mesh and choice of colours.
@@ -475,7 +473,7 @@ We will denote this one 'Wacky fractal', as its equation would not be fun to try
475473

476474
```{code-cell} ipython3
477475
output = newton_fractal(small_mesh, sin_sum, d_sin_sum, num_iter=10, r=1)
478-
kwargs = {'title': 'Wacky \ fractal', 'figsize': (6, 6), 'extent': [-1, 1, -1, 1], 'cmap': 'terrain'}
476+
kwargs = {'title': 'Wacky \\ fractal', 'figsize': (6, 6), 'extent': [-1, 1, -1, 1], 'cmap': 'terrain'}
479477
480478
plot_fractal(output, **kwargs)
481479
```
@@ -550,7 +548,7 @@ def accident(z):
550548

551549
```{code-cell} ipython3
552550
output = general_julia(mesh, f=accident, num_iter=15, c=0, radius=np.pi)
553-
kwargs = {'title': 'Accidental \ fractal', 'cmap': 'Blues'}
551+
kwargs = {'title': 'Accidental \\ fractal', 'cmap': 'Blues'}
554552
555553
plot_fractal(output, **kwargs);
556554
```

0 commit comments

Comments
 (0)
Please sign in to comment.