Skip to content

Commit

Permalink
rename rect3D to bar3D
Browse files Browse the repository at this point in the history
  • Loading branch information
jokergoo committed Mar 24, 2021
1 parent 49e4fa6 commit 7caac70
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ComplexHeatmap
Type: Package
Title: Make Complex Heatmaps
Version: 2.7.9.1004
Version: 2.7.9.1005
Date: 2021-3-24
Author: Zuguang Gu
Maintainer: Zuguang Gu <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export("anno_summary")
export("anno_text")
export("anno_zoom")
export("annotation_axis_grob")
export("bar3D")
export("bin_genome")
export("cluster_between_groups")
export("cluster_within_group")
Expand Down Expand Up @@ -203,7 +204,6 @@ export("order.comb_mat")
export("packLegend")
export("pheatmap")
export("pindex")
export("rect3D")
export("restore_matrix")
export("rowAnnotation")
export("row_anno_barplot")
Expand Down
48 changes: 24 additions & 24 deletions R/00_S4_generic_methods.R
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
setGeneric('column_order', function(object, ...) standardGeneric('column_order'))
setGeneric('row_dend', function(object, ...) standardGeneric('row_dend'))
setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors'))
setGeneric('set_component_height', function(object, ...) standardGeneric('set_component_height'))
setGeneric('prepare', function(object, ...) standardGeneric('prepare'))
setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list'))
setGeneric('annotation_legend_size', function(object, ...) standardGeneric('annotation_legend_size'))
setGeneric('make_layout', function(object, ...) standardGeneric('make_layout'))
setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation'))
setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list'))
setGeneric('re_size', function(object, ...) standardGeneric('re_size'))
setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend'))
setGeneric('draw', function(object, ...) standardGeneric('draw'))
setGeneric('color_mapping_legend', function(object, ...) standardGeneric('color_mapping_legend'))
setGeneric('draw_heatmap_list', function(object, ...) standardGeneric('draw_heatmap_list'))
setGeneric('row_order', function(object, ...) standardGeneric('row_order'))
setGeneric('draw_dimnames', function(object, ...) standardGeneric('draw_dimnames'))
setGeneric('row_dend', function(object, ...) standardGeneric('row_dend'))
setGeneric('draw_annotation', function(object, ...) standardGeneric('draw_annotation'))
setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap'))
setGeneric('copy_all', function(object, ...) standardGeneric('copy_all'))
setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend'))
setGeneric('make_row_cluster', function(object, ...) standardGeneric('make_row_cluster'))
setGeneric('column_dend', function(object, ...) standardGeneric('column_dend'))
setGeneric('draw_heatmap_body', function(object, ...) standardGeneric('draw_heatmap_body'))
setGeneric('set_component_width', function(object, ...) standardGeneric('set_component_width'))
setGeneric('set_component_height', function(object, ...) standardGeneric('set_component_height'))
setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster'))
setGeneric('column_order', function(object, ...) standardGeneric('column_order'))
setGeneric('draw_title', function(object, ...) standardGeneric('draw_title'))
setGeneric('draw_heatmap_body', function(object, ...) standardGeneric('draw_heatmap_body'))
setGeneric('copy_all', function(object, ...) standardGeneric('copy_all'))
setGeneric('make_row_cluster', function(object, ...) standardGeneric('make_row_cluster'))
setGeneric('draw_annotation_legend', function(object, ...) standardGeneric('draw_annotation_legend'))
setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list'))
setGeneric('component_width', function(object, ...) standardGeneric('component_width'))
setGeneric('component_height', function(object, ...) standardGeneric('component_height'))
setGeneric('get_legend_param_list', function(object, ...) standardGeneric('get_legend_param_list'))
setGeneric('draw_dimnames', function(object, ...) standardGeneric('draw_dimnames'))
setGeneric('heatmap_legend_size', function(object, ...) standardGeneric('heatmap_legend_size'))
setGeneric('draw_dend', function(object, ...) standardGeneric('draw_dend'))
setGeneric('make_layout', function(object, ...) standardGeneric('make_layout'))
setGeneric('color_mapping_legend', function(object, ...) standardGeneric('color_mapping_legend'))
setGeneric('get_legend_param_list', function(object, ...) standardGeneric('get_legend_param_list'))
setGeneric('adjust_heatmap_list', function(object, ...) standardGeneric('adjust_heatmap_list'))
setGeneric('make_column_cluster', function(object, ...) standardGeneric('make_column_cluster'))
setGeneric('re_size', function(object, ...) standardGeneric('re_size'))
setGeneric('attach_annotation', function(object, ...) standardGeneric('attach_annotation'))
setGeneric('map_to_colors', function(object, ...) standardGeneric('map_to_colors'))
setGeneric('add_heatmap', function(object, ...) standardGeneric('add_heatmap'))
setGeneric('row_order', function(object, ...) standardGeneric('row_order'))
setGeneric('draw_heatmap_legend', function(object, ...) standardGeneric('draw_heatmap_legend'))
setGeneric('prepare', function(object, ...) standardGeneric('prepare'))
setGeneric('component_height', function(object, ...) standardGeneric('component_height'))
setGeneric('component_width', function(object, ...) standardGeneric('component_width'))
setGeneric('get_color_mapping_list', function(object, ...) standardGeneric('get_color_mapping_list'))
6 changes: 3 additions & 3 deletions R/3d.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#
# == example
# grid.newpage()
# rect3D(c(0.3, 0.7), 0.5, 0.2, 0.2, 0.2, fill = 2:3)
# bar3D(c(0.3, 0.7), 0.5, 0.2, 0.2, 0.2, fill = 2:3)
#
rect3D = function(x, y, w, h, l, theta = 60, default.units = "npc", fill = "white", col = "black") {
bar3D = function(x, y, w, h, l, theta = 60, default.units = "npc", fill = "white", col = "black") {

if(!is.unit(x)) x = unit(x, default.units)
if(!is.unit(y)) y = unit(y, default.units)
Expand Down Expand Up @@ -165,7 +165,7 @@ Heatmap3D = function(matrix,
v = pindex(matrix, i, j)
od = rank(order(-as.numeric(y), -as.numeric(x)))
grid.rect(x[od], y[od], w[od], h[od], gp = gpar(col = "white", fill = "#EEEEEE"))
rect3D(x[od], y[od], w[od]*bar_rel_width, h[od]*bar_rel_height, v[od]/max(matrix)*bar_max_length, theta = bar_angle, fill = f[od])
bar3D(x[od], y[od], w[od]*bar_rel_width, h[od]*bar_rel_height, v[od]/max(matrix)*bar_max_length, theta = bar_angle, fill = f[od])
},
show_row_dend = show_row_dend,
show_column_dend = show_column_dend,
Expand Down
2 changes: 1 addition & 1 deletion man/add_heatmap-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{add_heatmap}.
\code{add_heatmap} can be dispatched on following classes:

\itemize{
\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{add_heatmap,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{add_heatmap,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{add_heatmap,Heatmap-method}}, \code{\link{Heatmap-class}} class method
}
}
Expand Down
8 changes: 4 additions & 4 deletions man/rect3D.Rd → man/bar3D.Rd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
\name{rect3D}
\alias{rect3D}
\name{bar3D}
\alias{bar3D}
\title{
Draw 3D bars
}
\description{
Draw 3D bars
}
\usage{
rect3D(x, y, w, h, l, theta = 60, default.units = "npc", fill = "white", col = "black")
bar3D(x, y, w, h, l, theta = 60, default.units = "npc", fill = "white", col = "black")
}
\arguments{

Expand All @@ -24,5 +24,5 @@ rect3D(x, y, w, h, l, theta = 60, default.units = "npc", fill = "white", col = "
}
\examples{
grid.newpage()
rect3D(c(0.3, 0.7), 0.5, 0.2, 0.2, 0.2, fill = 2:3)
bar3D(c(0.3, 0.7), 0.5, 0.2, 0.2, 0.2, fill = 2:3)
}
2 changes: 1 addition & 1 deletion man/column_dend-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{column_dend}.
\code{column_dend} can be dispatched on following classes:

\itemize{
\item \code{\link{column_dend,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{column_dend,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{column_dend,Heatmap-method}}, \code{\link{Heatmap-class}} class method
}
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/component_height-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{component_height}.
\code{component_height} can be dispatched on following classes:

\itemize{
\item \code{\link{component_height,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{component_height,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{component_height,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
}
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/component_width-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{component_width}.
\code{component_width} can be dispatched on following classes:

\itemize{
\item \code{\link{component_width,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{component_width,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{component_width,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
}
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/copy_all-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{copy_all}.
\code{copy_all} can be dispatched on following classes:

\itemize{
\item \code{\link{copy_all,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
\item \code{\link{copy_all,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
\item \code{\link{copy_all,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
}
}
\examples{
Expand Down
6 changes: 3 additions & 3 deletions man/draw-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Method dispatch page for \code{draw}.
\code{draw} can be dispatched on following classes:

\itemize{
\item \code{\link{draw,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{draw,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{draw,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
\item \code{\link{draw,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{draw,Legends-method}}, \code{\link{Legends-class}} class method
\item \code{\link{draw,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
\item \code{\link{draw,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
\item \code{\link{draw,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{draw,Heatmap-method}}, \code{\link{Heatmap-class}} class method
}
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/draw_title-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{draw_title}.
\code{draw_title} can be dispatched on following classes:

\itemize{
\item \code{\link{draw_title,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{draw_title,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{draw_title,Heatmap-method}}, \code{\link{Heatmap-class}} class method
}
}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion man/row_order-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Method dispatch page for \code{row_order}.
\code{row_order} can be dispatched on following classes:

\itemize{
\item \code{\link{row_order,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{row_order,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{row_order,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
}
}
\examples{
Expand Down
6 changes: 3 additions & 3 deletions man/show-dispatch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Method dispatch page for \code{show}.
\code{show} can be dispatched on following classes:

\itemize{
\item \code{\link{show,ColorMapping-method}}, \code{\link{ColorMapping-class}} class method
\item \code{\link{show,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{show,AnnotationFunction-method}}, \code{\link{AnnotationFunction-class}} class method
\item \code{\link{show,Heatmap-method}}, \code{\link{Heatmap-class}} class method
\item \code{\link{show,HeatmapList-method}}, \code{\link{HeatmapList-class}} class method
\item \code{\link{show,HeatmapAnnotation-method}}, \code{\link{HeatmapAnnotation-class}} class method
\item \code{\link{show,ColorMapping-method}}, \code{\link{ColorMapping-class}} class method
\item \code{\link{show,SingleAnnotation-method}}, \code{\link{SingleAnnotation-class}} class method
\item \code{\link{show,Heatmap-method}}, \code{\link{Heatmap-class}} class method
}
}
\examples{
Expand Down

0 comments on commit 7caac70

Please sign in to comment.