Insert math sign in plot title using bquote

I am trying to insert a "greater than or equal to" sign in my plot title using bquote. I do get it to work but only when I type a "dot" after the "tilde". So the "dot" gets visible in the plot title, and I want to get rid of that.

This works:
main = bquote("Boxplot for MFE, h" ~. <= ~ "8")

But this doesnt work:
main = bquote("Boxplot for MFE, h" ~ <= ~ "8")

I am following the tutorial here:

How can I get it to work without the "dot"?

Lose the first ~

plot(mtcars$hp,mtcars$mpg, 
     main = bquote("Boxplot for MFE, h" <= ~ "8"))

Created on 2023-06-25 with reprex v2.0.2

Simple as that. Many thanks technocrat!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.