For example. Consider the code
plot(rnorm(10), xlab = NA, ylab = NA)
mtext(side=1, expression( paste("Log"["10"], ( frac( "x","y") ) )))
I would like to make the parentheses in the expression larger, to fit the size of the expression inside them. Note the expression is actually much more complicated in my actual script, but this is a minimal reproducible example that captures the essence of the problem.
From the demo pointed out by @Pascal, the answer is to use bgroup
mtext(side=1, expression( paste("Log"["10"], bgroup("(", frac( "x","y"), ")" ) )))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With