You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quirky little issue this. Using quarto/pdf, I created a plot with plotmath greek character mu $\mu$ in the y label. In rendering to pdf, if the chunk's dev is not selected {r}, the greek mu is rendered as a proportional symbol ($\propto$). If I use {r,dev='cairo_pdf'} , mu renders correctly. The same code in pure R (executed from the console) shows properly. Here's a MWE in quarto. I hope this is a known issue. Any help is welcome.
Unicode plotting in R is a sad mess -.- There was an issue where Cran did a crack down recently: #66
I'm pretty sure the default printing also depends on your locale and language settings.
Iirc we tried using cairo_pdf, but it did not play well with other parts of the plotting code... or I didn't have the time to fully convert all plotting 🤷♂️ we may revisit this topic at some point
Are you asking for help, or was this just a comment on how you solved the issue?
Thanks for the update. Kinda both - asking for help and the comment on the approach to use if ever one needs to avoids these circumstances. I haven't tried all possibilities, only noticed that 'mu' becomes 'proportion' but beta renders correctly. I haven't noticed other issues with cairo_pdf. What should I be looking out for?
A quirky little issue this. Using quarto/pdf, I created a plot with plotmath greek character mu$\mu$ in the y label. In rendering to pdf, if the chunk's dev is not selected {r}, the greek mu is rendered as a proportional symbol ($\propto$ ). If I use {r,dev='cairo_pdf'} , mu renders correctly. The same code in pure R (executed from the console) shows properly. Here's a MWE in quarto. I hope this is a known issue. Any help is welcome.
`---
format: pdf
{r}
#| echo: false
#| message: false
#| fig-cap: myCap
#| fig-height: 3.5
#| fig-width: 5.
#| out-width: 5.in
x <- rnorm(20,0,1)
plot(x,
xlab='x var',
ylab=expression(paste('The Greek Letter mu (', mu, ')')))
{r,dev='cairo_pdf'}
#| echo: false
#| message: false
#| fig-cap: myCap2
#| fig-height: 3.5
#| fig-width: 5.
#| out-width: 5.in
plot(x,
xlab='x var',
ylab=expression(paste('The Greek Letter mu (', mu, ')')))
`
The text was updated successfully, but these errors were encountered: