Hi Luca
try
http://glimmer.rstudio.com/veepsirtt/myplot/How to increase the plot size to full screen?
thanks
veepsirtt
#....................................
server.R
#.....................................
shinyServer(function(input, output) {
myplot <- function() {
#par(mfrow=c(3,1))
mat <- matrix(c(1,2,3), 3, 1, byrow = TRUE)
nf <- layout(mat, widths = c(200, 200, 200), height = c(100,100,100 ), TRUE)
layout.show(nf)
y1 <- rnorm(50)
plot(y1)
y2 <- rnorm(100)
plot(y2)
y3 <- rnorm(200)
plot(y3)
}
output$distPlot <- renderPlot({ myplot() })
output$downloadData <- downloadHandler(
filename = 'myplots.png',
content = function(file) {
png(file, width = 1000, height = 1000, units = "px", pointsize = 12, bg = "white", res = NA)
myplot()
dev.off()
},
contentType = 'image/png'
)
})
#.....................
# ui.R
#-------------------
library(shiny)
# Define UI for application that plots random distributions
shinyUI(pageWithSidebar(
# Application title
headerPanel("Hello Shiny!"),
# Sidebar with a slider input for number of observations
sidebarPanel(
#sliderInput("obs",
# "Number of observations:",
# min = 0,
# max = 1000,
#value = 500),
downloadButton('downloadData', 'Download')
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
))