[R] Bounding box on plotting files inserted into a LaTeX document
Patrick Connolly
p_conno||y @end|ng |rom @||ng@hot@co@nz
Fri May 17 01:04:20 CEST 2019
I'm trying to write basic latex code to insert a pdf graphic into a
document. I can use Rstudio to knit an Rmd file successfully
inserting the plot into the document. I can get the latex code if the
"save tex" box is ticked, so I get the correct syntax used.
I don't need all the fancy things that .Rmd files can handle. I just
want a simple .tex file. However, if I try to use a pdf file normally
produced by using the pdf device, I get a message about a missing
bounding box. So I thought it might work to use R to make an eps
file, which pdflatex automatically converts to a pdf. It does import
the graphic, but it takes up a whole page, which indicates that it
ignores the bounding box.
What does work is to use Rstudio interactively to export the graphic
to a pdf file which pdflatex handles correctly. But that's a clunky
procedure which I'd like to avoid. It must be possible since graphs
were included in LaTeX documents for decades before there was Rstudio.
TIA
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Average minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Eleanor Roosevelt
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
More information about the R-help
mailing list