0

I'm trying to export a plot from R to tikz but every time I export it, the generated file is missing the \end keyword and is not complete. How should I fix it?

Here is my code:

setwd("~/Google Drive/")
library(plot3D)
library(tikzDevice)
tikz('test.tex')

hist3D (x = 1:5, y = 1:4, z = VADeaths,
        bty = "g", phi = 20,  theta = -60,
        xlab = "", ylab = "", zlab = "", main = "VADeaths",
        col = "#0072B2", border = "black", shade = 0.8,
        ticktype = "detailed", space = 0.15, d = 2, cex.axis = 1e-9)

Update 2 Here is how the end of the file should look like (the last point does not have the correct coordinates as I copied it over from few lines above):

    \path[draw=drawColor,line width= 0.4pt,line join=round,line cap=round,fill=fillColor] (264.63,101.94) --
        (214.37,119.05) --
        (214.33,120.18) --
        (297.45,134.94) --
        cycle;
\end{scope}
\end{tikzpicture}
Ash
  • 336
  • 4
  • 19
  • what's the error message you get? your code works fine on my machine. maybe your `setwd()` is incorrect. – epo3 Jun 29 '16 at 15:46
  • No errors in the code it compiles fine but the "generated file" has missing statements. – Ash Jun 29 '16 at 15:51
  • 1
    I've added `library(tikzDevice)` to the code as you must have loaded it previously. – epo3 Jun 29 '16 at 16:17
  • For me this is not reproducible ... it all works as you expect it. – J_F Jun 29 '16 at 16:39

0 Answers0