Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exponent in a plotmath expression

Tags:

plot

r

plotmath

I would like to have the following, for example in a ggplot2 label:

ylab(expression((hat(beta)^(2))(x)))

but without the parentheses around the hat(beta)^(2). But if I remove the parentheses, then the (x) goes up to the exponent.

Is there grouping in these expressions? Or invisible parentheses?

like image 732
Xu Wang Avatar asked Apr 16 '12 04:04

Xu Wang


1 Answers

Is this what you would like?

ylab(expression(hat(beta)^(2)*(x)))
like image 169
BenBarnes Avatar answered Sep 21 '22 16:09

BenBarnes