Quick R Christmas tree

Dear readers,

Wish you all best in year 2017!

Here is a little R code:


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"), 
                 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….



See you in 2017!


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