0

Desired output

 library(ggplot2)
 data(iris)

 ggplot(iris, aes(x = Sepal.Length  , y = Sepal.Width )) +
   geom_point() +
   labs(title = expression(paste('x = 30, ', y[0] , ' =  3')))

However, I'd like to supply the 3 from a variable. Something like

var <- 3
labs(title = expression(paste('x = 30, ', y[0] , ' =  ', var)))
jandraor
  • 187
  • 1
  • 10

0 Answers0