I am trying to send a plotly plot that I made in R to my account, but I keep getting the following error:
Error: Client error: (400) Bad Request Figure field is invalid. Reason: Raw data arrays are not allowed at this endpoint. Use grid references instead. Raw data found at the following paths in the figure [('data', 0, u'marker', u'color'), ('data', 1, u'marker', u'color')]
The plotly plot looks good in RStudio. It just won’t push to my Plotly account.
pal <- c("grey10", "grey90") ax <- list( title = "", zeroline = FALSE, showline = FALSE, showticklabels = FALSE, showgrid = FALSE ) p <- plot_ly(data = df[1:115,], showlegend = FALSE) %>% add_trace(x = ~X1, y = ~`X2`, color = ~X2`, colors = pal, type='scatter', mode = 'lines', showlegend=FALSE) %>% layout(xaxis = ax, yaxis = ax, showlegend = FALSE) api_create(x = p, filename = "plotname")
Thank-you for any suggestions.