Skip to content

Instantly share code, notes, and snippets.

@hkmoon
Created October 4, 2019 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkmoon/6ceefa3ef588125ee0088d4a9dd64cee to your computer and use it in GitHub Desktop.
Save hkmoon/6ceefa3ef588125ee0088d4a9dd64cee to your computer and use it in GitHub Desktop.
R ploty usage
library(plotly)
library("RColorBrewer")
# display.brewer.all()
x <- c("Non-MT", "MT-8", "MT-16")
y <- c(61.88, 6.79, 2.38)
color <- brewer.pal(n = 3, name = "Dark2")
p <- plot_ly(
x = ~x,
y = ~y,
text = y,
textposition = "auto",
name = x,
marker = list(color=color),
type = "bar"
) %>% layout(title = "MinCostSurface performance with MT and Non-MT",
yaxis = list(title = 'seconds'),
xaxis = list(title = 'Multi threads'))
embed_notebook(p, height="500")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment