How to add arrow below the y axis in plotly 3D scatter plot?

六月ゝ 毕业季﹏ 提交于 2019-12-08 07:50:54

问题


Creating 3D scatter plot with annotation by plotly can be done following the example:

library(plotly)
whole_dat = data.frame(x1 = rnorm(50), y1 = rnorm(50), z1 = rnorm(50))
p <-
   plot_ly() %>%
   add_markers(
   x = whole_dat$x1,
   y = whole_dat$y1,
   z = whole_dat$z1)


p = layout(p,
  scene = list(
    annotations = list(list(
      x = 0.3,
      y = -3,
      z = -0.1,
      text = "12345",
      textangle= 0,
      ax = 0,
      ay = -75,
      xref='x',
      axref='x',
      yref = 'paper',
      ayref = 'paper',
      zref = 'paper',
      #showarrow=TRUE,
      arrowcolor= "black",
      arrowsize= 3,
      arrowwidth= 1,
      arrowhead= 1
    ))
  )
)
htmlwidgets::saveWidget(as_widget(p), "test.html")

However, is there any easy way to add arrows below the y axis?

来源:https://stackoverflow.com/questions/45623139/how-to-add-arrow-below-the-y-axis-in-plotly-3d-scatter-plot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!