Re: [R] GGPLOT: Superscript text in body of plot

2022-01-29 Thread Rui Barradas
Hello, And with annotate, the warning goes away. ggplot(jjdata, aes(x=x, y=y))+ geom_point(size=2,shape=1)+ annotate( "text", x=3, y=7.5, label="R^{2} == 0.23", parse = TRUE ) Hope this helps, Rui Barradas Às 20:04 de 29/01/2022, Rui Barradas escreveu: Hello, Here is

Re: [R] GGPLOT: Superscript text in body of plot

2022-01-29 Thread Rui Barradas
Hello, Here is a way. ggplot(jjdata, aes(x=x, y=y))+ geom_point(size=2,shape=1)+ geom_text(x=3, y=7.5, label=expression(paste(R^2 == '0.23'))) Hope this helps, Rui Barradas Às 19:32 de 29/01/2022, Sorkin, John escreveu: Can you help me create text that has a superscript 2? I am trying