Plotly 3D表面,重命名轴标题

发布于 2025-02-01 05:21:26 字数 237 浏览 4 评论 0原文

以下是我尝试的玩具示例。有什么问题吗?

library(plotly)
fig <- plot_ly(z = ~volcano)
fig <- fig %>% add_surface() %>%
  layout(
    xaxis = list(title = 'N'), 
    yaxis = list(title = 'R')
  )

fig

感谢您的时间。

Below is the toy example I have attempted. Is anything wrong with it?

library(plotly)
fig <- plot_ly(z = ~volcano)
fig <- fig %>% add_surface() %>%
  layout(
    xaxis = list(title = 'N'), 
    yaxis = list(title = 'R')
  )

fig

Thanks for your time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泪之魂 2025-02-08 05:21:26

尝试在布局中添加场景

library(plotly)

fig <- plot_ly(z = ~volcano)
fig <- fig %>% 
  add_surface() %>%
  layout(
    showlegend = F,
    scene = list(
      xaxis = list(title = 'N'), 
      yaxis = list(title = 'R')
    )
  )

fig

“带有轴标签的Plotly

Try adding scene in layout:

library(plotly)

fig <- plot_ly(z = ~volcano)
fig <- fig %>% 
  add_surface() %>%
  layout(
    showlegend = F,
    scene = list(
      xaxis = list(title = 'N'), 
      yaxis = list(title = 'R')
    )
  )

fig

plotly 3d with axis labels

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文