Not sure if R's plot_ly function has this capability (i havent been able to find it), but figured I'd ask). Plot_ly does have a paper_bgcolor parameter that changes the color of the paper that the plot is on, as such:
mydf = data.frame(x = 1:5, y = 1:5)
plot_ly(mydf) %>%
add_trace(x = ~x, y = ~x, type = 'scatter', mode = 'markers',
marker = list(size = 24)) %>%
layout(paper_bgcolor = 'red')
I am not interested in changing the paper color, but rather the paper border. That is, I'd like a red box around the outer edge of the paper. Does anybody know a simple way to do this?
EDIT — I think I may have to use the grid package for this / it could be done with grid, but I'm curious first if it's possible without incorporating another package.