(v3.1.0.9017) Add labels_taxonomy() for taxonomic names in italics in plot labels, add type = "plotmath" to italicise_taxonomy(), and only italicise species names after a genus

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-11-09 20:45:07 +01:00
1 parent db7377f517
commit cfb55a4c3e
14 files changed
+272 -79

No files matched your search

+11
View File
@@ -433,6 +433,17 @@ autoplot(mic_values)
autoplot(mic_values, mo = "K. pneumoniae", ab = "cipro", guideline = "EUCAST")
```
Taxonomic names are printed in italics by convention. Use `labels_taxonomy()` for this in axis and legend labels, and `italicise_taxonomy(..., type = "plotmath")` for titles:
```{r labels_taxonomy}
our_data_1st %>%
count(species = mo_name(bacteria)) %>%
ggplot(aes(x = species, y = n)) +
geom_col() +
scale_x_discrete(labels = labels_taxonomy) +
labs(title = italicise_taxonomy("First isolates of E. coli and other species", type = "plotmath"))
```
----
*Author: Dr. Matthijs Berends, 23rd June 2026*