Skip to content

Commit 02744e5

Browse files
committed
change wording
1 parent 9c7470f commit 02744e5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lectures/matplotlib.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,16 @@ Another useful feature in Matplotlib is [style sheets](https://matplotlib.org/st
274274

275275
We can use style sheets to create plots with uniform styles.
276276

277-
We can find a list of available style sheets by printing the attribute `plt.style.available`
277+
We can find a list of available styles by printing the attribute `plt.style.available`
278278

279279

280280
```{code-cell} python3
281281
print(plt.style.available)
282282
```
283-
We can also use the `plt.style.use()` method to set the style sheet.
284283

285-
Let's write a function that draws different types of graphs with a given style sheet
284+
We can now use the `plt.style.use()` method to set the style sheet.
285+
286+
Let's write a function that takes the name of a style sheet and draws different plots with the style
286287

287288
```{code-cell} python3
288289
@@ -312,10 +313,10 @@ def draw_graphs(style='default'):
312313
rnormY = norm.rvs(loc=m, scale=s, size=150)
313314
axes[1].plot(rnormX, rnormY, ls='none', marker='o', alpha=0.7)
314315
315-
# a histogram with X
316+
# Create a histogram with random X values
316317
axes[2].hist(rnormX, alpha=0.7)
317318
318-
# and a line graph with Y
319+
# and a line graph with random Y values
319320
axes[3].plot(x, rnormY, linewidth=2, alpha=0.7)
320321
321322
plt.suptitle(f'Style: {style}', fontsize=13)
@@ -331,7 +332,7 @@ First, we draw graphs with the style sheet `seaborn`
331332
draw_graphs(style='seaborn')
332333
```
333334

334-
Then, we can use `grayscale` to remove colors
335+
We can use `grayscale` to remove colors in plots
335336

336337
```{code-cell} python3
337338
draw_graphs(style='grayscale')
@@ -349,9 +350,9 @@ We can also use the style `dark_background`
349350
draw_graphs(style='dark_background')
350351
```
351352

352-
You can use the function to experiment with more styles.
353+
You can use the function to experiment with other styles in the list.
353354

354-
If you are interested, you can even create [our own style sheets](https://matplotlib.org/stable/tutorials/introductory/customizing.html#defining-your-own-style).
355+
If you are interested, you can even create [your own style sheets](https://matplotlib.org/stable/tutorials/introductory/customizing.html#defining-your-own-style).
355356

356357
## Further Reading
357358

0 commit comments

Comments
 (0)