Skip to content

Instantly share code, notes, and snippets.

@pachevalier
Created May 7, 2014 17:05
Show Gist options
  • Select an option

  • Save pachevalier/6f9ea02430609536da5e to your computer and use it in GitHub Desktop.

Select an option

Save pachevalier/6f9ea02430609536da5e to your computer and use it in GitHub Desktop.
library("ggplot2")
set.seed(1234)
N <- 100
df <- data.frame(i = 1:N, x = rnorm(N))
df$y <- 1 + df$x + rnorm(N)
df$z <- (runif(N) < .3)
pdf("output/test.pdf")
ggplot(data = df, aes(x = x, y = y, shape = z)) +
geom_point(size = 3) +
scale_shape_manual(values = c(16,1))
dev.off()
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment