... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
\name{color_mapping_legend-ColorMapping-method} |
2 | 2 |
\alias{color_mapping_legend,ColorMapping-method} |
3 |
+\alias{color_mapping_legend} |
|
3 | 4 |
\title{ |
4 | 5 |
Draw Legend Based on Color Mapping |
5 | 6 |
} |
... | ... |
@@ -69,8 +70,8 @@ A \code{\link{Legends-class}} object. |
69 | 70 |
\author{ |
70 | 71 |
Zuguang Gu <z.gu@dkfz.de> |
71 | 72 |
} |
72 |
-\alias{color_mapping_legend} |
|
73 | 73 |
\examples{ |
74 | 74 |
# There is no example |
75 | 75 |
NULL |
76 |
+ |
|
76 | 77 |
} |
... | ... |
@@ -1,6 +1,5 @@ |
1 | 1 |
\name{color_mapping_legend-ColorMapping-method} |
2 | 2 |
\alias{color_mapping_legend,ColorMapping-method} |
3 |
-\alias{color_mapping_legend} |
|
4 | 3 |
\title{ |
5 | 4 |
Draw Legend Based on Color Mapping |
6 | 5 |
} |
... | ... |
@@ -70,8 +69,8 @@ A \code{\link{Legends-class}} object. |
70 | 69 |
\author{ |
71 | 70 |
Zuguang Gu <z.gu@dkfz.de> |
72 | 71 |
} |
72 |
+\alias{color_mapping_legend} |
|
73 | 73 |
\examples{ |
74 | 74 |
# There is no example |
75 | 75 |
NULL |
76 |
- |
|
77 | 76 |
} |
... | ... |
@@ -48,7 +48,7 @@ Draw Legend Based on Color Mapping |
48 | 48 |
\item{border}{Color for legend grid borders. Pass to \code{\link{Legend}}.} |
49 | 49 |
\item{at}{Break values of the legend. By default it is the levels in the \code{\link{ColorMapping-class}} object.} |
50 | 50 |
\item{labels}{Labels corresponding to break values.} |
51 |
- \item{labels_gp}{Graphical parameters for legend labels.} |
|
51 |
+ \item{labels_gp}{Graphcial parameters for legend labels.} |
|
52 | 52 |
\item{labels_rot}{Rotation of labels.} |
53 | 53 |
\item{nrow}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
54 | 54 |
\item{ncol}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
... | ... |
@@ -48,7 +48,7 @@ Draw Legend Based on Color Mapping |
48 | 48 |
\item{border}{Color for legend grid borders. Pass to \code{\link{Legend}}.} |
49 | 49 |
\item{at}{Break values of the legend. By default it is the levels in the \code{\link{ColorMapping-class}} object.} |
50 | 50 |
\item{labels}{Labels corresponding to break values.} |
51 |
- \item{labels_gp}{Graphcial parameters for legend labels.} |
|
51 |
+ \item{labels_gp}{Graphical parameters for legend labels.} |
|
52 | 52 |
\item{labels_rot}{Rotation of labels.} |
53 | 53 |
\item{nrow}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
54 | 54 |
\item{ncol}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
\name{color_mapping_legend-ColorMapping-method} |
2 | 2 |
\alias{color_mapping_legend,ColorMapping-method} |
3 |
+\alias{color_mapping_legend} |
|
3 | 4 |
\title{ |
4 | 5 |
Draw Legend Based on Color Mapping |
5 | 6 |
} |
... | ... |
@@ -69,8 +70,8 @@ A \code{\link{Legends-class}} object. |
69 | 70 |
\author{ |
70 | 71 |
Zuguang Gu <z.gu@dkfz.de> |
71 | 72 |
} |
72 |
-\alias{color_mapping_legend} |
|
73 | 73 |
\examples{ |
74 | 74 |
# There is no example |
75 | 75 |
NULL |
76 |
+ |
|
76 | 77 |
} |
... | ... |
@@ -1,6 +1,5 @@ |
1 | 1 |
\name{color_mapping_legend-ColorMapping-method} |
2 | 2 |
\alias{color_mapping_legend,ColorMapping-method} |
3 |
-\alias{color_mapping_legend} |
|
4 | 3 |
\title{ |
5 | 4 |
Draw Legend Based on Color Mapping |
6 | 5 |
} |
... | ... |
@@ -70,8 +69,8 @@ A \code{\link{Legends-class}} object. |
70 | 69 |
\author{ |
71 | 70 |
Zuguang Gu <z.gu@dkfz.de> |
72 | 71 |
} |
72 |
+\alias{color_mapping_legend} |
|
73 | 73 |
\examples{ |
74 | 74 |
# There is no example |
75 | 75 |
NULL |
76 |
- |
|
77 | 76 |
} |
... | ... |
@@ -29,7 +29,7 @@ Draw Legend Based on Color Mapping |
29 | 29 |
legend_height = NULL, |
30 | 30 |
legend_width = NULL, |
31 | 31 |
legend_direction = c("vertical", "horizontal"), |
32 |
- interval_dist = NULL, |
|
32 |
+ break_dist = NULL, |
|
33 | 33 |
|
34 | 34 |
graphics = NULL, |
35 | 35 |
param = NULL) |
... | ... |
@@ -56,7 +56,7 @@ Draw Legend Based on Color Mapping |
56 | 56 |
\item{legend_height}{Height of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{vertical}. Pass to \code{\link{Legend}}.} |
57 | 57 |
\item{legend_width}{Width of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{horizontal}. Pass to \code{\link{Legend}}.} |
58 | 58 |
\item{legend_direction}{When \code{color_bar} is \code{continuous}, whether the legend is vertical or horizontal? Pass to \code{\link{Legend}}.} |
59 |
- \item{interval_dist}{A zooming factor to control relative distance of two neighbouring break values.The length of it should be \code{length(at) - 1} or a scalar. } |
|
59 |
+ \item{break_dist}{A zooming factor to control relative distance of two neighbouring break values.The length of it should be \code{length(at) - 1} or a scalar. } |
|
60 | 60 |
\item{graphics}{Internally used.} |
61 | 61 |
\item{param}{All the legend-related parameters can be specified as a single list.} |
62 | 62 |
|
... | ... |
@@ -29,6 +29,7 @@ Draw Legend Based on Color Mapping |
29 | 29 |
legend_height = NULL, |
30 | 30 |
legend_width = NULL, |
31 | 31 |
legend_direction = c("vertical", "horizontal"), |
32 |
+ interval_dist = NULL, |
|
32 | 33 |
|
33 | 34 |
graphics = NULL, |
34 | 35 |
param = NULL) |
... | ... |
@@ -55,6 +56,7 @@ Draw Legend Based on Color Mapping |
55 | 56 |
\item{legend_height}{Height of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{vertical}. Pass to \code{\link{Legend}}.} |
56 | 57 |
\item{legend_width}{Width of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{horizontal}. Pass to \code{\link{Legend}}.} |
57 | 58 |
\item{legend_direction}{When \code{color_bar} is \code{continuous}, whether the legend is vertical or horizontal? Pass to \code{\link{Legend}}.} |
59 |
+ \item{interval_dist}{A zooming factor to control relative distance of two neighbouring break values.The length of it should be \code{length(at) - 1} or a scalar. } |
|
58 | 60 |
\item{graphics}{Internally used.} |
59 | 61 |
\item{param}{All the legend-related parameters can be specified as a single list.} |
60 | 62 |
|
... | ... |
@@ -30,6 +30,7 @@ Draw Legend Based on Color Mapping |
30 | 30 |
legend_width = NULL, |
31 | 31 |
legend_direction = c("vertical", "horizontal"), |
32 | 32 |
|
33 |
+ graphics = NULL, |
|
33 | 34 |
param = NULL) |
34 | 35 |
} |
35 | 36 |
\arguments{ |
... | ... |
@@ -54,6 +55,7 @@ Draw Legend Based on Color Mapping |
54 | 55 |
\item{legend_height}{Height of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{vertical}. Pass to \code{\link{Legend}}.} |
55 | 56 |
\item{legend_width}{Width of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{horizontal}. Pass to \code{\link{Legend}}.} |
56 | 57 |
\item{legend_direction}{When \code{color_bar} is \code{continuous}, whether the legend is vertical or horizontal? Pass to \code{\link{Legend}}.} |
58 |
+ \item{graphics}{Internally used.} |
|
57 | 59 |
\item{param}{All the legend-related parameters can be specified as a single list.} |
58 | 60 |
|
59 | 61 |
} |
... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
\name{color_mapping_legend-ColorMapping-method} |
2 | 2 |
\alias{color_mapping_legend,ColorMapping-method} |
3 |
+\alias{color_mapping_legend} |
|
3 | 4 |
\title{ |
4 | 5 |
Draw Legend Based on Color Mapping |
5 | 6 |
} |
... | ... |
@@ -65,8 +66,8 @@ A \code{\link{Legends-class}} object. |
65 | 66 |
\author{ |
66 | 67 |
Zuguang Gu <z.gu@dkfz.de> |
67 | 68 |
} |
68 |
-\alias{color_mapping_legend} |
|
69 | 69 |
\examples{ |
70 | 70 |
# There is no example |
71 | 71 |
NULL |
72 |
+ |
|
72 | 73 |
} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,72 @@ |
1 |
+\name{color_mapping_legend-ColorMapping-method} |
|
2 |
+\alias{color_mapping_legend,ColorMapping-method} |
|
3 |
+\title{ |
|
4 |
+Draw Legend Based on Color Mapping |
|
5 |
+} |
|
6 |
+\description{ |
|
7 |
+Draw Legend Based on Color Mapping |
|
8 |
+} |
|
9 |
+\usage{ |
|
10 |
+\S4method{color_mapping_legend}{ColorMapping}(object, |
|
11 |
+ plot = TRUE, ..., |
|
12 |
+ |
|
13 |
+ color_bar = object@type, |
|
14 |
+ |
|
15 |
+ title = object@name, |
|
16 |
+ title_gp = gpar(fontsize = 10, fontface = "bold"), |
|
17 |
+ title_position = "topleft", |
|
18 |
+ grid_height = unit(4, "mm"), |
|
19 |
+ grid_width = unit(4, "mm"), |
|
20 |
+ border = NULL, |
|
21 |
+ at = object@levels, |
|
22 |
+ labels = at, |
|
23 |
+ labels_gp = gpar(fontsize = 10), |
|
24 |
+ labels_rot = 0, |
|
25 |
+ nrow = NULL, |
|
26 |
+ ncol = 1, |
|
27 |
+ by_row = FALSE, |
|
28 |
+ legend_height = NULL, |
|
29 |
+ legend_width = NULL, |
|
30 |
+ legend_direction = c("vertical", "horizontal"), |
|
31 |
+ |
|
32 |
+ param = NULL) |
|
33 |
+} |
|
34 |
+\arguments{ |
|
35 |
+ |
|
36 |
+ \item{object}{A \code{\link{ColorMapping-class}} object.} |
|
37 |
+ \item{plot}{Whether to plot or just return the legend object?} |
|
38 |
+ \item{...}{Pass to \code{\link{draw,Legends-method}}.} |
|
39 |
+ \item{color_bar}{"continous" or "discrete". It controls whether to show the discrete legend for the continuous color mapping.} |
|
40 |
+ \item{title}{Title of the legend, by default it is the name of the legend.} |
|
41 |
+ \item{title_gp}{Graphical parameters for legend title.} |
|
42 |
+ \item{title_position}{Position of the title. See \code{\link{Legend}} for all possible values.} |
|
43 |
+ \item{grid_height}{Height of each legend grid. Pass to \code{\link{Legend}}.} |
|
44 |
+ \item{grid_width}{Width of each legend grid. Pass to \code{\link{Legend}}.} |
|
45 |
+ \item{border}{Color for legend grid borders. Pass to \code{\link{Legend}}.} |
|
46 |
+ \item{at}{Break values of the legend. By default it is the levels in the \code{\link{ColorMapping-class}} object.} |
|
47 |
+ \item{labels}{Labels corresponding to break values.} |
|
48 |
+ \item{labels_gp}{Graphcial parameters for legend labels.} |
|
49 |
+ \item{labels_rot}{Rotation of labels.} |
|
50 |
+ \item{nrow}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
|
51 |
+ \item{ncol}{Pass to \code{\link{Legend}}. It controls the layout of legend grids if they are arranged in multiple rows or columns.} |
|
52 |
+ \item{by_row}{Pass to \code{\link{Legend}}. It controls the order of legend grids if they are arranged in multiple rows or columns.} |
|
53 |
+ \item{legend_height}{Height of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{vertical}. Pass to \code{\link{Legend}}.} |
|
54 |
+ \item{legend_width}{Width of the legend body. It only works when \code{color_bar} is \code{continuous} and \code{direction} is \code{horizontal}. Pass to \code{\link{Legend}}.} |
|
55 |
+ \item{legend_direction}{When \code{color_bar} is \code{continuous}, whether the legend is vertical or horizontal? Pass to \code{\link{Legend}}.} |
|
56 |
+ \item{param}{All the legend-related parameters can be specified as a single list.} |
|
57 |
+ |
|
58 |
+} |
|
59 |
+\details{ |
|
60 |
+The legend is constructed by \code{\link{Legend}}. |
|
61 |
+} |
|
62 |
+\value{ |
|
63 |
+A \code{\link{Legends-class}} object. |
|
64 |
+} |
|
65 |
+\author{ |
|
66 |
+Zuguang Gu <z.gu@dkfz.de> |
|
67 |
+} |
|
68 |
+\alias{color_mapping_legend} |
|
69 |
+\examples{ |
|
70 |
+# There is no example |
|
71 |
+NULL |
|
72 |
+} |