Reputation: 15
I need an L with a dot above (so basically U+1E36, but with the dot above the L) to include it in the title, e.g.
ggplot() + geom_line() + labs(title = expression(paste("The title is ", frac(L with dot above,L))))
Unfortunately, I can`t find the Unicode for this, and I don't know how to combine Unicode, so it's working in ggplot. So, how can I do that? Thanks for any help!
Upvotes: 0
Views: 171
Reputation: 173803
The Unicode for "dot above previous character" is U+0307
, so you can do:
ggplot() +
geom_line() +
labs(title = "The title is L\u0307") +
theme(plot.title = element_text(size = 50))
Created on 2021-06-03 by the reprex package (v0.3.0)
Upvotes: 0
Reputation: 44867
You can use dot(L)
in an expression to put a dot over it:
ggplot() + geom_line() + labs(title = expression(paste("The title is ", frac(dot(L),L))))
See ?plotmath
for the list of things that work in expressions in titles and labels.
Upvotes: 1