Boxplot Alignment problem when knitting Pdf

I'm trying to plot boxplot using boxplot() from base package. When I run the code chunk in R markdown it works fine but when I knit it to pdf the figure goes to the right like this:

The code chunk is pretty simple:
boxplot(a$medSalary,horizontal = TRUE, names = 'Projected Salary',xlab='[$]',las=1)
And BTW, I'm using TinyTex.
Thanks in advance

Fortunately, Rmd can handle HTML markup. (Had to do a screenshot because the discourse platform would otherwise use it as format instructions)



Thank you very much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.