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}