Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Plot rendering not posting to plot.ly server

This is my first time trying to use plot.ly and I want to demo the dashboard using the rpackage. The code I am using is below. When I do this I get an empty plot in my account and when I look at the code in my graph on the site it is just a {}. Is there something else I need to be doing here? The graph seems to render fine locally.

my code

library(plotly)
set.seed(100)

plotly(‘username’, ‘apikey’)

d <- diamonds[sample(nrow(diamonds), 1000), ]
plot_ly(d, x = carat, y = price, text = paste("Clarity: ", clarity),
mode = “markers”, color = carat, size = carat)

plotly_POST(d, filename = ‘diamonds’, fileopt = “overwrite”, sharing =“public”)