【发布时间】:2021-10-06 04:29:53
【问题描述】:
我有一个代码,它每次都下载以相同尺寸形成的图形的 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)
【问题讨论】:
标签: r ggplot2 shiny plotly r-plotly