简体   繁体   中英

R plotly 3d scatterplot setting axis limits

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 xy 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")))

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM