Skip to content

Commit 718c24e

Browse files
authored
03-matplotlib.md: improving image descriptions (#921)
* Episode 3: improving image descriptions (issue #781) - Improve image description for 5 figures in _episodes/03-matplotlib.md as suggested by @ivastar * 03-matplotlib.md: Split line for alt text in 'inflammation-01-line-styles.svg' (changes requested to #921) * Co-authored-by: Ivelina Momcheva <[email protected]>
1 parent cdf3df0 commit 718c24e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

_episodes/03-matplotlib.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ matplotlib.pyplot.show()
4141
~~~
4242
{: .language-python}
4343

44-
![Average Inflammation Over Time](../fig/inflammation-01-average.svg)
44+
![A line graph showing the average inflammation across all patients over a 40-day period.](../fig/inflammation-01-average.svg)
4545

4646
Here, we have put the average inflammation per day across all patients in the variable
4747
`ave_inflammation`, then asked `matplotlib.pyplot` to create and display a line graph of those
@@ -54,15 +54,15 @@ matplotlib.pyplot.show()
5454
~~~
5555
{: .language-python}
5656

57-
![Maximum Value Along The First Axis](../fig/inflammation-01-maximum.svg)
57+
![A line graph showing the maximum inflammation across all patients over a 40-day period.](../fig/inflammation-01-maximum.svg)
5858

5959
~~~
6060
min_plot = matplotlib.pyplot.plot(numpy.min(data, axis=0))
6161
matplotlib.pyplot.show()
6262
~~~
6363
{: .language-python}
6464

65-
![Minimum Value Along The First Axis](../fig/inflammation-01-minimum.svg)
65+
![A line graph showing the minimum inflammation across all patients over a 40-day period.](../fig/inflammation-01-minimum.svg)
6666

6767
The maximum value rises and falls smoothly, while the minimum seems to be a step function. Neither
6868
trend seems particularly likely, so either there's a mistake in our calculations or something is
@@ -110,7 +110,7 @@ matplotlib.pyplot.show()
110110
~~~
111111
{: .language-python}
112112

113-
![The Previous Plots as Subplots](../fig/inflammation-01-group-plot.svg)
113+
![Three line graphs showing the daily average, maximum and minimum inflammation over a 40-day period.](../fig/inflammation-01-group-plot.svg)
114114

115115
The [call]({{ page.root }}/reference.html#function-call) to `loadtxt` reads our data,
116116
and the rest of the program tells the plotting library
@@ -229,7 +229,8 @@ formats, including SVG, PDF, and JPEG.
229229
> > matplotlib.pyplot.show()
230230
> > ~~~
231231
> > {: .language-python}
232-
> ![Plot with step lines](../fig/inflammation-01-line-styles.svg)
232+
> ![Three line graphs, with step lines connecting the points, showing the daily average, maximum
233+
and minimum inflammation over a 40-day period.](../fig/inflammation-01-line-styles.svg)
233234
> {: .solution}
234235
{: .challenge}
235236

0 commit comments

Comments
 (0)