我有一个代码,它每次都下载以相同尺寸绘制的图形的 png 图像。我想生成一个质量更高的图像。就像我点击图表右上角提供的按钮一样,它应该以不同的尺寸下载
参考代码如下
library(shiny)
library(plotly)
ui <- fluidPage(
selectInput("choice","Choose",choices = names(iris),selected = NULL),plotlyOutput("graph")
)
server <- function(input,output,session){
output$graph <- renderPlotly({
plot_ly(iris,x = ~get(input$choice),y = ~Sepal.Length,type = 'scatter',mode = 'markers')
})
}
shinyApp(ui,server)