diff --git a/README.html b/README.html index cdf900b..bf46933 100644 --- a/README.html +++ b/README.html @@ -605,8 +605,8 @@
  • eheat
  • @@ -701,7 +701,7 @@

    Installation

    ComplexHeatmap is the ease of plotting statistical annotations. Another benefit is that the legends can be internally extracted from the ggplot2 plot, eliminating the need for manual addition of legends.

    -

    ggheat

    +

    ggheat

    Using ggheat, it is effortless to create a simple Heatmap. The default color mapping was not consistent between ComplexHeatmap and ggplot2.

    @@ -877,7 +877,7 @@

    ggheat

    ) -

    gganno

    +

    gganno

    The same with ggheat, the essential parameter of gganno is also the ggfn, which accepts a ggplot2 object equipped with a default data and mappings established by @@ -1117,58 +1117,69 @@

    anno_gg and top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = NULL, - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) ) - +
    # anno_gg2-panel: margins = "l" --------
     ggheat(m,
       top_annotation = HeatmapAnnotation(
         ggplot = anno_gg2(g, "panel",
           margins = "l",
    -      height = unit(6, "cm"),
    +      height = unit(3, "cm"),
           show_name = FALSE
         )
       )
     )
    - +
    # anno_gg2-panel: margins = "r" --------
     ggheat(m,
       top_annotation = HeatmapAnnotation(
         ggplot = anno_gg2(g, "panel",
           margins = "r",
    -      height = unit(6, "cm"),
    +      height = unit(3, "cm"),
           show_name = FALSE
         )
       )
     )
    - +
    # anno_gg2-plot ---------------------
     ggheat(m,
       top_annotation = HeatmapAnnotation(
         ggplot = anno_gg2(g, "plot",
    -      height = unit(6, "cm"),
    +      height = unit(3, "cm"),
           show_name = FALSE
         )
       )
     )
    - +
    # anno_gg2-full --------------------
     ggheat(m,
       top_annotation = HeatmapAnnotation(
    -    ggplot = anno_gg2(g, "full",
    -      height = unit(6, "cm"),
    -      show_name = FALSE
    -    )
    -  )
    -)
    - + ggplot = anno_gg2( + g + guides(colour = guide_legend( + theme = theme( + legend.key.size = unit(1, "mm"), + legend.text = element_text(size = 10), + legend.key.spacing = unit(0, "mm"), + legend.title.position = "bottom", + legend.key = element_blank() + ), + ncol = 2L + )), + align_with = "full", + height = unit(3, "cm"), + show_name = FALSE + ) + ) +) + diff --git a/README.md b/README.md index 893d155..2cd9813 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ - [eheat](#eheat) - [Installation](#installation) - - [ggheat](#ggheat) - - [gganno](#gganno) + - [`ggheat`](#ggheat) + - [`gganno`](#gganno) - [`anno_gg` and `anno_gg2`](#anno_gg-and-anno_gg2) @@ -109,7 +109,7 @@ ComplexHeatmap is the ease of plotting statistical annotations. Another benefit is that the legends can be internally extracted from the ggplot2 plot, eliminating the need for manual addition of legends. -## ggheat +## `ggheat` Using `ggheat`, it is effortless to create a simple Heatmap. The default color mapping was not consistent between ComplexHeatmap and ggplot2. @@ -344,7 +344,7 @@ draw( -## gganno +## `gganno` The same with `ggheat`, the essential parameter of `gganno` is also the `ggfn`, which accepts a ggplot2 object equipped with a default data and @@ -620,7 +620,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = NULL, - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -635,7 +635,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = "l", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -650,7 +650,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = "r", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -664,7 +664,7 @@ ggheat(m, ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "plot", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -677,8 +677,19 @@ ggheat(m, # anno_gg2-full -------------------- ggheat(m, top_annotation = HeatmapAnnotation( - ggplot = anno_gg2(g, "full", - height = unit(6, "cm"), + ggplot = anno_gg2( + g + guides(colour = guide_legend( + theme = theme( + legend.key.size = unit(1, "mm"), + legend.text = element_text(size = 10), + legend.key.spacing = unit(0, "mm"), + legend.title.position = "bottom", + legend.key = element_blank() + ), + ncol = 2L + )), + align_with = "full", + height = unit(3, "cm"), show_name = FALSE ) ) diff --git a/man/figures/README-anno_gg2-full-1.png b/man/figures/README-anno_gg2-full-1.png index e2e1152..015e73b 100644 Binary files a/man/figures/README-anno_gg2-full-1.png and b/man/figures/README-anno_gg2-full-1.png differ diff --git a/man/figures/README-anno_gg2-panel1-1.png b/man/figures/README-anno_gg2-panel1-1.png index fffe675..38b35b7 100644 Binary files a/man/figures/README-anno_gg2-panel1-1.png and b/man/figures/README-anno_gg2-panel1-1.png differ diff --git a/man/figures/README-anno_gg2-panel2-1.png b/man/figures/README-anno_gg2-panel2-1.png index 27475c5..8c84b24 100644 Binary files a/man/figures/README-anno_gg2-panel2-1.png and b/man/figures/README-anno_gg2-panel2-1.png differ diff --git a/man/figures/README-anno_gg2-panel3-1.png b/man/figures/README-anno_gg2-panel3-1.png index 8dcaa0e..eec9739 100644 Binary files a/man/figures/README-anno_gg2-panel3-1.png and b/man/figures/README-anno_gg2-panel3-1.png differ diff --git a/man/figures/README-anno_gg2-plot-1.png b/man/figures/README-anno_gg2-plot-1.png index 89cab06..87e3c91 100644 Binary files a/man/figures/README-anno_gg2-plot-1.png and b/man/figures/README-anno_gg2-plot-1.png differ diff --git a/vignettes/eheat.Rmd b/vignettes/eheat.Rmd index 1f17f65..362626a 100644 --- a/vignettes/eheat.Rmd +++ b/vignettes/eheat.Rmd @@ -90,7 +90,7 @@ ggplot2 in ComplexHeatmap is the ease of plotting statistical annotations. Another benefit is that the legends can be internally extracted from the ggplot2 plot, eliminating the need for manual addition of legends. -## ggheat +## `ggheat` Using `ggheat`, it is effortless to create a simple Heatmap. The default color mapping was not consistent between ComplexHeatmap and ggplot2. @@ -261,7 +261,7 @@ draw( ) ``` -## gganno +## `gganno` The same with `ggheat`, the essential parameter of `gganno` is also the `ggfn`, which accepts a ggplot2 object equipped with a default data and mappings established by `ggplot(data, aes(.data$.x (or .data$.y)))`. The original matrix @@ -497,7 +497,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = NULL, - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -510,7 +510,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = "l", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -523,7 +523,7 @@ ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "panel", margins = "r", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -535,7 +535,7 @@ ggheat(m, ggheat(m, top_annotation = HeatmapAnnotation( ggplot = anno_gg2(g, "plot", - height = unit(6, "cm"), + height = unit(3, "cm"), show_name = FALSE ) ) @@ -546,8 +546,19 @@ ggheat(m, # anno_gg2-full -------------------- ggheat(m, top_annotation = HeatmapAnnotation( - ggplot = anno_gg2(g, "full", - height = unit(6, "cm"), + ggplot = anno_gg2( + g + guides(colour = guide_legend( + theme = theme( + legend.key.size = unit(1, "mm"), + legend.text = element_text(size = 10), + legend.key.spacing = unit(0, "mm"), + legend.title.position = "bottom", + legend.key = element_blank() + ), + ncol = 2L + )), + align_with = "full", + height = unit(3, "cm"), show_name = FALSE ) ) diff --git a/vignettes/eheat_files/figure-html/Heatmap_arg1-1.png b/vignettes/eheat_files/figure-html/Heatmap_arg1-1.png new file mode 100644 index 0000000..6870f6a Binary files /dev/null and b/vignettes/eheat_files/figure-html/Heatmap_arg1-1.png differ diff --git a/vignettes/eheat_files/figure-html/Heatmap_arg2-1.png b/vignettes/eheat_files/figure-html/Heatmap_arg2-1.png new file mode 100644 index 0000000..5b5bb28 Binary files /dev/null and b/vignettes/eheat_files/figure-html/Heatmap_arg2-1.png differ diff --git a/vignettes/eheat_files/figure-html/Heatmap_arg3-1.png b/vignettes/eheat_files/figure-html/Heatmap_arg3-1.png new file mode 100644 index 0000000..5f85b03 Binary files /dev/null and b/vignettes/eheat_files/figure-html/Heatmap_arg3-1.png differ diff --git a/vignettes/eheat_files/figure-html/Heatmap_arg4-1.png b/vignettes/eheat_files/figure-html/Heatmap_arg4-1.png new file mode 100644 index 0000000..b4fbc89 Binary files /dev/null and b/vignettes/eheat_files/figure-html/Heatmap_arg4-1.png differ diff --git a/vignettes/eheat_files/figure-html/Heatmap_gganno-1.png b/vignettes/eheat_files/figure-html/Heatmap_gganno-1.png new file mode 100644 index 0000000..b5c30a5 Binary files /dev/null and b/vignettes/eheat_files/figure-html/Heatmap_gganno-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_bar-1.png b/vignettes/eheat_files/figure-html/anno_bar-1.png new file mode 100644 index 0000000..d4cb4a9 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_bar-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_box-1.png b/vignettes/eheat_files/figure-html/anno_box-1.png new file mode 100644 index 0000000..b1559b6 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_box-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg-panel-1.png b/vignettes/eheat_files/figure-html/anno_gg-panel-1.png new file mode 100644 index 0000000..7032d52 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg-panel-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg-panel-clip-1.png b/vignettes/eheat_files/figure-html/anno_gg-panel-clip-1.png new file mode 100644 index 0000000..944df7a Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg-panel-clip-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg-plot-1.png b/vignettes/eheat_files/figure-html/anno_gg-plot-1.png new file mode 100644 index 0000000..e13b677 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg-plot-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg-plot-2.png b/vignettes/eheat_files/figure-html/anno_gg-plot-2.png new file mode 100644 index 0000000..88ff009 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg-plot-2.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg2-panel1-1.png b/vignettes/eheat_files/figure-html/anno_gg2-panel1-1.png new file mode 100644 index 0000000..38b35b7 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg2-panel1-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg2-panel2-1.png b/vignettes/eheat_files/figure-html/anno_gg2-panel2-1.png new file mode 100644 index 0000000..8c84b24 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg2-panel2-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg2-panel3-1.png b/vignettes/eheat_files/figure-html/anno_gg2-panel3-1.png new file mode 100644 index 0000000..eec9739 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg2-panel3-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_gg2-plot-1.png b/vignettes/eheat_files/figure-html/anno_gg2-plot-1.png new file mode 100644 index 0000000..87e3c91 Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_gg2-plot-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_point-1.png b/vignettes/eheat_files/figure-html/anno_point-1.png new file mode 100644 index 0000000..f278cfb Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_point-1.png differ diff --git a/vignettes/eheat_files/figure-html/anno_violin-1.png b/vignettes/eheat_files/figure-html/anno_violin-1.png new file mode 100644 index 0000000..cf8395d Binary files /dev/null and b/vignettes/eheat_files/figure-html/anno_violin-1.png differ diff --git a/vignettes/eheat_files/figure-html/blank_rect-1.png b/vignettes/eheat_files/figure-html/blank_rect-1.png new file mode 100644 index 0000000..b33fa18 Binary files /dev/null and b/vignettes/eheat_files/figure-html/blank_rect-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat-1.png b/vignettes/eheat_files/figure-html/ggheat-1.png new file mode 100644 index 0000000..c0bbae1 Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_background-1.png b/vignettes/eheat_files/figure-html/ggheat_background-1.png new file mode 100644 index 0000000..8f7a267 Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_background-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_customize_rect-1.png b/vignettes/eheat_files/figure-html/ggheat_customize_rect-1.png new file mode 100644 index 0000000..8a23509 Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_customize_rect-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_geom-1.png b/vignettes/eheat_files/figure-html/ggheat_geom-1.png new file mode 100644 index 0000000..3b21459 Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_geom-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_legend-1.png b/vignettes/eheat_files/figure-html/ggheat_legend-1.png new file mode 100644 index 0000000..383cd3d Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_legend-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_legend_name1-1.png b/vignettes/eheat_files/figure-html/ggheat_legend_name1-1.png new file mode 100644 index 0000000..c21bfff Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_legend_name1-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_legend_name2-1.png b/vignettes/eheat_files/figure-html/ggheat_legend_name2-1.png new file mode 100644 index 0000000..489aefd Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_legend_name2-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_rownames-1.png b/vignettes/eheat_files/figure-html/ggheat_rownames-1.png new file mode 100644 index 0000000..d7b05ca Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_rownames-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_scale1-1.png b/vignettes/eheat_files/figure-html/ggheat_scale1-1.png new file mode 100644 index 0000000..6aadbf5 Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_scale1-1.png differ diff --git a/vignettes/eheat_files/figure-html/ggheat_scale2-1.png b/vignettes/eheat_files/figure-html/ggheat_scale2-1.png new file mode 100644 index 0000000..c78169f Binary files /dev/null and b/vignettes/eheat_files/figure-html/ggheat_scale2-1.png differ diff --git a/vignettes/eheat_files/figure-html/unnamed-chunk-3-1.png b/vignettes/eheat_files/figure-html/unnamed-chunk-3-1.png new file mode 100644 index 0000000..ba4a6ae Binary files /dev/null and b/vignettes/eheat_files/figure-html/unnamed-chunk-3-1.png differ