I used heatmaply and argument worked well. I know the plot saves in the "Viewer" tab. The resolution of the plot is too low.
Is there any way to save a high resolution plot from the viewer pane?
Also I used below mentioned code to change the colour of the plot, but it didn't work.
scale_fill_gradient_fun = scale_color_gradient(low = "#ddebe8", high = "#02362b",
space = "Lab", na.value = "grey50", guide = "colourbar", aesthetics = "colour")
Hi @ssumd,
If you are making your heat map with ggplot, then check out the ggsave() function which allows you to define the size of the graphic and the resolution when writing the file to disk (using code rather than the "Viewer").
HTH
Hi @DavoWW,
Thanks for the reply. I tried this code
ggsave(filename = p, plot = last_plot(), device = NULL, path = NULL,
scale = 1, width = NA,
height = NA,
dpi = 300)
and it did not work. The error message was
Error: device must be NULL, a string or a function.
Hi @ssumd,
Since your graphic is created using plotly it appears that saving it as a static file is non-trivial, as I found out when I Googled "save plotly object to image file in R".
Sorry I can't be more help.