Blog Archives

Christmas Tree with ggplot

December 25, 2016
By
Christmas Tree with ggplot

# create data x <- c(8,7,6,7,6,5,6,5,4,5,4,3,4,3,2,3,2,1,0.5,0.1) dat1 <- data.frame(x1 = 1:length(x), x2 = x) dat2 <- data.frame(x1 = 1:length(x), x2 = -x) dat1$xvar <- dat2$xvar <- NA dat1$yvar <- dat2$yvar <- NA dat1$siz <- dat2$siz <- NA dat1$col <- dat2$col dec_threshold){ dat1$xvar <- row #sample(1:dat1$x1,1) dat1$yvar <- sample(1:dat1$x2-1,1) dat1$siz <- runif(1,0.5,1.5) dat1$col dec_threshold){ dat2$xvar <-

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)