Может быть, это может помочь вам:
header <- dashboardHeader(
)
sidebar <- dashboardSidebar(
)
body <- dashboardBody(
box(title = "Test", width = 10, height = "500px",
plotlyOutput("plot",width = "400px", height = "400px")
)
)
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output) {
output$plot <- renderPlotly({
server <- function(input, output) {
output$plot <- renderPlotly({
p <- plot_ly()
p <- add_trace(p, x=a, y=b, z=c, mode="markers", type="scatter3d", marker = list(size = 5, color = 'rgba(0, 0, 0, 1)'))
p <- layout(p, scene = list(xaxis = list(title = "A",range = c(-2,2)), yaxis = list(title = "B",range = c(-2,2)), zaxis = list(title = "C",range = c(-2,2))))
p
})
}
shinyApp(ui, server)
})
}
shinyApp(ui, server)
box(title = "Test", width = 10, height = "500px",
plotlyOutput("plot",width = "400px", height = "400px")
)
- Определите ширину и высоту ящика
Определите ширину и высоту вашего ploty
p <- layout(p, scene = list(xaxis = list(title = "A",range = c(-2,2)), yaxis = list(title = "B",range = c(-2,2)), zaxis = list(title = "C",range = c(-2,2))))
Определите свой диапазон графиков оси