Skip to content

Instantly share code, notes, and snippets.

View dotRData's full-sized avatar

Rahul Anand dotRData

  • Groupon
  • Palo Alto
View GitHub Profile
library(ggplot2)
library(data.table)
ggplot(data.table(x=c(-2, 2)), aes(x)) +
stat_function(fun=function(x) sqrt(1 - (abs(x)-1)^2), color='red', size=3) +
stat_function(fun=function(x) -3*sqrt(1 - (sqrt(abs(x))/sqrt(2))), color='red', size=3) +
theme(legend.position = "none",
panel.background = element_rect(fill = "black"),
axis.ticks = element_blank(),
panel.grid = element_blank(),