rr-leaflet

Specify "Save as image" dimensions for Word processing


I have created a heatmap with leaflet, which I would like to export as image (.png) with the following dimensions:

This image will ultimately be pasted into a word document. I understand that there is the option to adjust the aspect ratio but not sure if there are alternative solutions.


Solution

  • # Creating a plot
    x=rnorm(20)
    plot(x)
    
    # saving plot
    png(file="saving_plot1.png",
        width=5, height=17.5, units="in", res=100)
    hist(x, col="Black")
    dev.off()