I have the following ggplot2
chart in R. I'm trying to bold part of the text in annotate
, however I'm not having success (tried wrapping it around a double asterisk below but this clearly doesn't work in the annotate
function. Does anyone know how I can bold the first sentence in this chart?
library(tidyverse)
tibble(x= 1:100, y= 1:100) %>%
ggplot(aes(x, y)) +
scale_x_continuous(minor_breaks = seq(10, 100, 10)) +
scale_y_continuous(minor_breaks = seq(10, 100, 10)) +
geom_rect(xmin = 17, xmax=83, ymin=90, ymax=100, color='black',
fill='#6d1d26', size=0.25) +
annotate('text', x= 50, y=95, label= "**This sentence should be bold.** This sentence shouldn't", size=5, col = 'white')