I have the following data frame.
df<-data.frame(tt=c(3,6,2,7),pp=c("A","B","C","D"))
And when plotting a bar chart. I get the result.
library(ggplot2)
library(dplyr)
df %>% ggplot(aes(x=pp, y=tt))+
geom_col()+
theme_classic()
My query is. How can I make the letter C of my graph bold, only the "C"
What you want would be something similar to the following:
If you can install the ggtext package :
install.packages("ggtext")
you have the possibility to handle styles for many graphic elements, for example the x-axis labels, even individually:Grades:
axis.text.x = element_markdown()
sets that the element is of typemarkdown
, so you could simply define the values ofx
as**<etiqueta>**
label
byfct_reorder()
so that it respects the same order of the raw datapp