R plotly 3d scatterplot setting axis limits

Viewed 726

I can't seem to change the limits on my plotly 3d scatter plot. I attach the code below. I wanted to update the xaxis, but when I run this code, I still get the same chart on the viewier. My x y and z ranges range in the millions, so this would be a very small subset I am trying to create a chart for.

searches_plot<-plot_ly(x=comb_data$TV.Impacts, y=comb_data$Social.impressions, 
                           z=comb_data$Display.impressions,type="scatter3d", mode="markers",
                           color=comb_data$searches_type, marker = list(size = 5))%>% 
                          layout(xaxis=list(range=c(0,6)),
                            
                             title = "Combined CPA",
                             scene = list(
                               xaxis = list(title = "TV Impacts"),
                               yaxis = list(title = "Social.imp"),
                               zaxis = list(title = "Display.imp")))
1 Answers

I have now done this. It was simply a case of combining the two lists for the x axis, instead of having them separate

Related