Embolden substring of object passed through geom_text()

前端 未结 2 474
情歌与酒
情歌与酒 2021-01-03 17:12

I\'m trying to produce a graph and I\'d like to bold part of a string of a geom_text(). Here\'s some sample data and a graph:

temp <- data.f         


        
2条回答
  •  滥情空心
    2021-01-03 17:57

    Try this:

    my_text <- expression(paste("small ", bold("bullet"), " point of text"))
    ggplot() +
      lims(x = c(0,100), y = c(0, 100)) + 
      annotate('text', x=25, y=25, label=my_text)
    

提交回复
热议问题