Reputation: 3557
I want to write the following text when I plot something in R. Here the subscript is Greek letters alpha and nu with a comma in between.
I tried the following code but didn't get comma and nu.
plot(1, 1, main = expression(t[alpha, nu]))
Any suggestions?
Upvotes: 5
Views: 2465
Reputation: 887701
We can also use bquote
plot(1, 1, main = bquote(t[alpha*","*nu]))
Or as @Roland mentioned, quote
would also work
plot(1, 1, main = quote(t[alpha*","*nu]))
Upvotes: 5
Reputation: 99361
You could use paste()
to include the comma:
plot(1, 1, main = expression(t[paste(alpha, ",", nu)]))
giving
Upvotes: 5