Skip to content

Instantly share code, notes, and snippets.

@MattSkiff
Created March 15, 2020 11:52
Show Gist options
  • Save MattSkiff/5692be5c3d9822e2b4a43d81f6f84cb9 to your computer and use it in GitHub Desktop.
Save MattSkiff/5692be5c3d9822e2b4a43d81f6f84cb9 to your computer and use it in GitHub Desktop.
ggplot2 - Sorted column chart with angled labels. Popularity of deep learning packages on github.
# author: matthew skiffington
# # purpose: make simple sorted column chart for dissertation re:dl repos
library(ggplot2)
library(scales)
dl_gitstars.vec <-
c(
'Pytorch' = 39600,
'Keras' = 47200,
'fast.ai' = 17400,
'CNTK' = 16700,
'Tensorflow' = 142000,
'DL4J' = 11500,
'Theano' = 9100,
'Chainer' = 5300,
'PlaidML' = 3200,
'Caffe' = 30000,
'Torch' = 8500,
'Apache MxNet' = 18400,
'Sonnet' = 8300,
'Lasagne' = 3700,
'TFLearn' = 9400
)
framework_stars.df <- data.frame(Framework_Name = names(dl_gitstars.vec),Github_stars = dl_gitstars.vec)
g <- ggplot(data = framework_stars.df) +
geom_col(mapping = aes(y = Github_stars,x = reorder(Framework_Name,-Github_stars))) +
labs(title = "Github Stars of Popular Deep Learning Packages",
subtitle = "As of 13th March, 2020",
caption = "Torch, Caffee and Theano are not in active development",
x = "Framework",
y = "Github Stars") +
theme_light() +
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1)) +
scale_y_continuous(labels = comma)
g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment