Commit 0ef99d1c authored by Midoux Cedric's avatar Midoux Cedric

ggsave (cm)

parent 88e023e0
...@@ -385,8 +385,8 @@ plotDownload <- function() { ...@@ -385,8 +385,8 @@ plotDownload <- function() {
title = "Download last modified plot", title = "Download last modified plot",
size = "s", size = "s",
textInput("plotName", "File name : ", value = "plot"), textInput("plotName", "File name : ", value = "plot"),
numericInput("plotWidth", "Width : ", value = 7), numericInput("plotWidth", "Width (cm) : ", value = 7),
numericInput("plotHeight", "Height : ", value = 7), numericInput("plotHeight", "Height (cm) : ", value = 7),
numericInput("plotDPI", "DPI : ", value = 300), numericInput("plotDPI", "DPI : ", value = 300),
radioButtons("plotFormat", "File format : ", choices = c("png", "pdf", "jpeg", "svg", "wmf"), selected = "png", inline = TRUE), radioButtons("plotFormat", "File format : ", choices = c("png", "pdf", "jpeg", "svg", "wmf"), selected = "png", inline = TRUE),
footer = tagList(modalButton("Cancel"), footer = tagList(modalButton("Cancel"),
...@@ -397,7 +397,7 @@ plotDownload <- function() { ...@@ -397,7 +397,7 @@ plotDownload <- function() {
output$okPlot <- downloadHandler( output$okPlot <- downloadHandler(
filename = function() {paste(input$plotName, input$plotFormat, sep = ".")}, filename = function() {paste(input$plotName, input$plotFormat, sep = ".")},
content = function(file) {ggsave(file, width = input$plotWidth, height = input$plotHeight, dpi = input$plotDPI)} content = function(file) {ggsave(file, width = input$plotWidth, height = input$plotHeight, dpi = input$plotDPI, units = "cm")}
) )
# output$rarefactionMin <- renderText({ # output$rarefactionMin <- renderText({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment