Hello,
I am including my script below. I am creating a heatmap here and this code will draw the image within the console. Is there a way that I can save these images directly to a directory or save as pdf?
h_map = Heatmap(as.matrix(cormat), #dat_row_scaled,
name = "sample",
col = colorRamp2(c(0,0.5,1), c(colors[2], "white", colors[1])),
cluster_columns=TRUE,
cluster_rows=TRUE,
show_column_dend=FALSE,
show_row_dend=FALSE,
show_column_names = TRUE,
show_row_names = TRUE,
column_names_gp = gpar(fontsize = font_size * 0.8),
row_names_gp = gpar(fontsize = font_size * 0.8),
row_names_side = "left",
column_title = "",
column_title_gp = gpar(fontsize = font_size * 0.9),
heatmap_legend_param = list(direction = "vertical"))
ht_list = h_map
draw(ht_list, heatmap_legend_side = "right", annotation_legend_side = "bottom")