Skip to content

Instantly share code, notes, and snippets.

@aarong1
Created January 30, 2022 21:18
Show Gist options
  • Save aarong1/09ab480a1872f02f4e46efdc5c8ecbd3 to your computer and use it in GitHub Desktop.
Save aarong1/09ab480a1872f02f4e46efdc5c8ecbd3 to your computer and use it in GitHub Desktop.
Example of using the naive plot_ly method
library(plotly)
fig <- plot_ly(
type = 'scatter',
mode='markers',
y=rep(5, 40),
marker=list(
size=seq(0, 39),
color=seq(0, 39),
colorbar=list(
title='Colorbar'
),
colorscale='Viridis',
reversescale =F
)
)
fig <- fig %>% layout(
xaxis = list(
showgrid = F,
zeroline = F
),
yaxis = list(
showgrid = F,
zeroline = F
)
)
fig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment