When I plot in Rstudio the plots look good (as it should) but when I try to knit the .rmd file to render the .pdf file, labels, titles and axes disappear.
Plot in Rstudio:
Plot in PDF:
Any idea why?
Facts:
- There are no error messages anywhere AT ALL
- Equations are rendered ok
- I use Ubuntu v20.04
- I have Rstudio v2021.09.0 Build 351 "Ghost Orchid" Release (077589bc, 2021-09-20) for Ubuntu Bionic
- with R v4.1.1 "Kick Things"
And I already tried the following:
- Installed X11 package as shown since I read that was probably the issue
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fxlrg
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg
sudo apt-get install xorg
sudo apt-get install xorg openbox
sudo apt-get install ubuntu-desktop
- Installed texlive-latex-extra
- Restarted Rstudio a million times
This is the configuration file
title: "knitting example"
author: "S_B04"
output:
pdf_document:
extra_dependencies:
- bbm
- xcolor
toc: yes
This is the code that produces above chart:
# plotting cars data
plot(cars)
Thank you very much for any help! I'm adding the MRE as suggestion.