Xu Wang
Xu Wang

Reputation: 10607

Exponent in a plotmath expression

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?

Upvotes: 6

Views: 4317

Answers (1)

BenBarnes
BenBarnes

Reputation: 19454

Is this what you would like?

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

Upvotes: 8

Related Questions