Alvin
Alvin

Reputation: 57

Squared units on the axis, how to fix?

I want to show on my y-axis Leaf area index (m^2/m^2). However, on my plot, I can't see last bracket. I am just wondering what is wrong with the code?

ylab=expression( "Leaf area index (m"^2/ "m"^2),

Upvotes: 1

Views: 29

Answers (1)

Ian Campbell
Ian Campbell

Reputation: 24790

One approach would be with bgroup.

plot(1,1,ylab=expression("Leaf area index"~bgroup("(","m"^2/ "m"^2,")")))

enter image description here

Upvotes: 1

Related Questions