I am trying to reduce the space between the numerator, denominator, and fraction line in R expression. Here is my MWE generating a very ugly legend text for the fraction:
tibble(
t = seq(0,60,.1),
osc = cos(log2(1+t)*pi+pi/4)
) %>%
ggplot(aes(t, osc))+
geom_line(aes(color = 'red'))+
scale_color_manual(values = 'red', labels = expression(cos(log[2](t+1)*pi+frac(pi,4))+10))+
theme(
legend.position = 'bottom'
)
The fraction introduces huge white space between the fraction line and numerator and denominator. Is there anyway to reduce this?