问题
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