Skip to content

Commit 1e22960

Browse files
authored
Merge pull request #489 from serahrono/patch-2
Add alt text to images and illustrations.
2 parents f12d6e7 + bb32459 commit 1e22960

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

_episodes/07-visualization-ggplot-python.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ surveys_plot + p9.geom_point()
140140
> > ~~~
141141
> > {: .language-python}
142142
> >
143-
> > ![png](../fig/06_challenge_bar.png)
143+
> > ![bar chart of count of rodents caught at each plot site](../fig/06_challenge_bar.png)
144144
> {: .solution}
145145
{: .challenge}
146146
@@ -178,7 +178,7 @@ instance, we can add transparency (alpha) to avoid overplotting:
178178
~~~
179179
{: .language-python}
180180
181-
![png](../fig/06_alpha_plot.png)
181+
![scatter plot of hindfoot-length vs weight of rodents, showing a curve increasing to a plateau](../fig/06_alpha_plot.png)
182182
183183
We can also add colors for all the points
184184
@@ -191,7 +191,7 @@ We can also add colors for all the points
191191
~~~
192192
{: .language-python}
193193
194-
![png](../fig/06_blue_plot.png)
194+
![scatter plot of hindfoot-length vs weight of rodents, demonstrating overplotting](../fig/06_blue_plot.png)
195195
196196
Or to color each species in the plot differently, map the `species_id` column
197197
to the color aesthetic:
@@ -238,7 +238,7 @@ could support the interpretation of the lower numbers:
238238
~~~
239239
{: .language-python}
240240
241-
![png](../fig/06_log_plot.png)
241+
![Scatterplot of hindfoot length versus weight where logarithmic x-axis is used to distribute lower numbers](../fig/06_log_plot.png)
242242
243243
- Changing the theme (`theme_*`) or some specific theming (`theme`) elements.
244244
Usually plots with white background look more readable when printed. We can
@@ -256,7 +256,7 @@ set the background to white using the function `theme_bw()`.
256256
~~~
257257
{: .language-python}
258258
259-
![png](../fig/06_white_plot.png)
259+
![Scatterplot of hindfoot length versus weight on a logarithmic x-axis using a white background](../fig/06_white_plot.png)
260260
261261
> ## Challenge - Bar plot adaptations
262262
> Adapt the bar plot of the previous exercise by mapping the `sex` variable to
@@ -295,7 +295,7 @@ group, a boxplot can be used:
295295
~~~
296296
{: .language-python}
297297
298-
![png](../fig/06_boxplot.png)
298+
![boxplot showing distribution of rodent weight for each species group ](../fig/06_boxplot.png)
299299
300300
By adding points of the individual observations to the boxplot, we can have a
301301
better idea of the number of measurements and of their distribution:
@@ -310,7 +310,7 @@ better idea of the number of measurements and of their distribution:
310310
~~~
311311
{: .language-python}
312312
313-
![png](../fig/06_point_boxplot.png)
313+
![Boxplot of weight by species overlaying observation points to visualize the distribution](../fig/06_point_boxplot.png)
314314
315315
> ## Challenge - distributions
316316
>
@@ -344,7 +344,7 @@ better idea of the number of measurements and of their distribution:
344344
> > )
345345
> > ~~~
346346
> > {: .language-python}
347-
> > ![png](../fig/06_challenge_boxplot.png)
347+
> > ![Violin plot of weight of species shown with weight scaled down and datapoints with color.](../fig/06_challenge_boxplot.png)
348348
> {: .solution}
349349
{: .challenge}
350350
@@ -397,7 +397,7 @@ modifying the aesthetic function and map the species_id to the color:
397397
~~~
398398
{: .language-python}
399399
400-
![png](../fig/06_time_plot.png)
400+
![Line graph of count per year where data for each species is indicated by a different color](../fig/06_time_plot.png)
401401
402402
## Faceting
403403
@@ -529,7 +529,7 @@ following example of a bar plot with the counts per year.
529529
~~~
530530
{: .language-python}
531531
532-
![png](../fig/06_overlap_bars.png)
532+
![Bar graph of count per year showing ovelapping x-axis labels](../fig/06_overlap_bars.png)
533533
534534
Notice that we use the `year` here as a categorical variable by using the
535535
`factor` functionality. However, by doing so, we have the individual year
@@ -546,7 +546,7 @@ rotate the text of the x-axis labels:
546546
~~~
547547
{: .language-python}
548548
549-
![png](../fig/06_good_bars.png)
549+
![Bar graph of count per year demonstrating how the theme function rotates the x-axis labels](../fig/06_good_bars.png)
550550
551551
When you like a specific set of theme-customizations you created, you can save
552552
them as an object to easily apply them to other plots you may create:
@@ -564,7 +564,7 @@ my_custom_theme = p9.theme(axis_text_x = p9.element_text(color="grey", size=10,
564564
~~~
565565
{: .language-python}
566566
567-
![png](../fig/06_theme_plot.png)
567+
![Bar graph of count per year demonstrating the use of a customized theme](../fig/06_theme_plot.png)
568568
569569
> ## Challenge - customization
570570
> Please take another five minutes to either improve one of the plots

0 commit comments

Comments
 (0)