I have a venn diagram plot I'm trying to save, so I created a downloadHandler
to save a .png as such:
output$downloadPlot <- downloadHandler(
filename = function() { paste0(input$title, '.png') },
content = function(file) {
png(file)
par(mar=c(5,4,4,2) + 0.1)
plotInput()
dev.off()
}
)
However, the image from the download differs from right clicking the plot and selecting "Save Image As..." when opened in the browser. I want to re-create the behavior of the latter because it does comes out higher-res and does not cut off the labels as shown here: