I have a shiny application which present a scatterplot. The shiny user perform data filtering, then the data is display in the plotly graph. Sometime, the data created will be all negative or all positive, but I still want to plot to be positioned a way that the origin (0,0) is displayed.
Example:
dd <- data.frame(x=c(2,3,6,2), y=c(5,2,7,3))
plot_ly(data=dd, x=~x, y=~y, type="scatter", mode="markers")
gives:
But I want it to look initially more like that:
Any idea how to do that?




