Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing tex fonts messes up plots #4055

Closed
JorisGoosen opened this issue Jun 9, 2020 · 2 comments
Closed

Installing tex fonts messes up plots #4055

JorisGoosen opened this issue Jun 9, 2020 · 2 comments

Comments

@JorisGoosen
Copy link

If one is working on Ubuntu 20.04 and one installs certain tex fonts, for instance "texmaker" and its related pkgs. ggplot2 no longer seems to render plots properly.

library(GGally)
ggpairs(mtcars[, c('mpg', 'cyl')])

Results in:
afbeelding

If I remove all tex related stuff from Ubuntu I get this:
afbeelding

Im guessing the fonts shouldn't stop working after installing tex but maybe im missing something.

This mostly came up for us at JASP through this issue: jasp-stats/jasp-issues#780 and there we can work around the problem by uninstalling "tex-gyre" but I don't understand why ggplot starts using these fonts, or getting messed up by it.

@thomasp85
Copy link
Member

This an issue with the png device and how it interprets mono fonts. There is nothing we can do from the ggplot2 side, but I know the issue has been raised. You can use the devices from ragg instead to avoid it, though it doesn't provide a windowed device, only file devices

@JorisGoosen
Copy link
Author

Ah thank you for the response!

Ok, I guess we will try that then. Luckily we don't need windowed devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants