Skip to content

Instantly share code, notes, and snippets.

@thomasjensen
Created December 7, 2011 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasjensen/1442398 to your computer and use it in GitHub Desktop.
Save thomasjensen/1442398 to your computer and use it in GitHub Desktop.
Use tkizDevice with ggplot2
library(tikzDevice)
library(ggplot2)
y <- exp(seq(1,10,.1))
x <- 1:length(y)
data <- data.frame(x = x, y = y)
tikz(file = "test.tex")
plot <- ggplot(data, aes(x = x, y = y)) + geom_line()
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment