Quick R Christmas tree

Dear readers,

Wish you all best in year 2017!

Here is a little R code:

library(ggplot2)

dataset <- c(9,8,7,6,5,4,4.5,4,3,2,1,0.8,0.2)

df <- data.frame(group = rep(c("l","d"), 
                             each=length(dataset)),
                 x = 1:length(dataset),
                 y = c(dataset, dataset*-1))

ggplot() +
  geom_bar(data = df, aes(x=x, y=y),stat = "identity", fill = '#00A650',width=.8) +
  coord_flip() + ggtitle("Happy New Year 2017") + theme_void()

And the result….

2016-12-30-11_35_58-plot-zoom

 

See you in 2017!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s