mirror of
https://github.com/msberends/AMR.git
synced 2026-11-16 03:40:48 +01:00
(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:
1 parent
db7377f517
commit
cfb55a4c3e
14 files changed
+272
-79
No files matched your search
@@ -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*
|
||||
Reference in new issue
Block a user