Skip to content

Instantly share code, notes, and snippets.

@commondatageek
Created July 1, 2014 17:48
Show Gist options
  • Save commondatageek/cb4432651685822497e4 to your computer and use it in GitHub Desktop.
Save commondatageek/cb4432651685822497e4 to your computer and use it in GitHub Desktop.
Save a file in EPS format
### Hey, Alison, here's how you save a ggplot graph in EPS format.
# Load the ggplot library
library(ggplot2)
# Need some data. We'll just make it up for now
obs = data.frame(
user=factor(c("A", "B", "C", "D")),
count=c(1, 2, 3, 4),
money=c(0.12, 3.45, 6.78, 9.10))
# create our plot
p <- ggplot(obs) + geom_point(aes(x=count, y=money, color=user))
# save the plot to EPS
ggsave(filename="/Users/airvine/Desktop/that_one_chart.eps")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment