Zoom in and out plot in R markdown

Hi,

I am using R markdown and flexdashboard and new this library, It seems very interesting to me to generate analysis reports. However, I am stuck in one of the plot to visualize with more depth and resolution (i.e zoom in and out). In pdf file, I can use zoom in/out for viewing. I tried using couple of arguments in a code chunk in the html format, but unsuccessful. Please assist me with this.

title: " Plot"
output: 
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source_code: embed


  
```{r setup, include=FALSE}
# Load dependencies
library(reshape2)
library(ggplot2)
library(stringr)
library(ComplexHeatmap)
library(flexdashboard)
library(knitr)

## Load data
load("Module.Rdata")
load("Illumina.Rdata")

############################### PLOT DOT HEATMAP ########################################

```{r, fig.height = 70, fig.width = 30, fig.align = 'center'}
ht=Heatmap(df_plot,
           cluster_rows = TRUE,
           cluster_columns = T,
           height = unit(4, "mm")*nrow(df_plot),
           width  = unit(4, "mm")*ncol(df_plot), 
           rect_gp = gpar(type = "none"),
           row_split = ann_table$Cluster,
           top_annotation = ha_column,
           left_annotation = row_ha,
           row_title_rot = 0,
           name = "% Response",
           row_names_max_width = unit(10,"in"),
           row_title_gp = gpar(fontsize = 12),
           column_names_gp = gpar(fontsize = 12),
           row_names_gp = gpar(fontsize = 12),
           cell_fun = function(j, i, x, y, width, height, fill) {
             grid.circle(x = x, y = y, r = unit(1.85, "mm") ,gp = gpar(fill = col_fun(df_plot[i, j]), col = NA))
           }
)
draw(ht,heatmap_legend_side = "left", annotation_legend_side = "left", padding = unit(c(2, 20, 2, 2), "mm"))

Thank you,
Toufiq

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.