Open colinbousige opened 1 year ago
Hi!
Thanks for opening the issue.
I am very busy currently due to moving, but could you try to replicate the plot with svglite
( https://github.com/r-lib/svglite )?
Most of the font rendering code in httpgd
is based on it.
Hi
And thanks for your answer !
It doesn't seem like I can reproduce the problem with svglite
, though:
library(svglite)
library(latex2exp)
svglite("test.svg")
plot(TeX(r'($\alpha$ and also $\beta$)'), cex=4)
dev.off()
The result is OK:
Thanks! Definitely a bug in httpgd
then. I will investigate as soon as I have a bit of free time.
Hello,
See original post here where the author of
latex2exp
tracked the issue to arise from thehttpgd
plot renderer.When plotting using
httpgd
andlatex2exp
, LaTeX expressions are missing spaces and are distorted. Doing the same plot in the normal R png renderer yields the expected result.To reproduce in a vanilla R terminal:
yields this:
instead of this :