... | ... |
@@ -23,36 +23,36 @@ geom_label2( |
23 | 23 |
) |
24 | 24 |
} |
25 | 25 |
\arguments{ |
26 |
-\item{mapping}{the aesthetic mapping} |
|
26 |
+\item{mapping}{Set of aesthetic mappings, defaults to NULL.} |
|
27 | 27 |
|
28 | 28 |
\item{data}{A layer specific dataset - |
29 | 29 |
only needed if you want to override the plot defaults.} |
30 | 30 |
|
31 |
-\item{...}{other arguments passed on to 'layer'} |
|
31 |
+\item{...}{other arguments passed on to 'layer'.} |
|
32 | 32 |
|
33 |
-\item{stat}{Name of stat to modify data} |
|
33 |
+\item{stat}{Name of the stat to modify data.} |
|
34 | 34 |
|
35 |
-\item{position}{The position adjustment to use for overlapping points on this layer} |
|
35 |
+\item{position}{The position adjustment to use for overlapping points on this layer.} |
|
36 | 36 |
|
37 |
-\item{family}{sans by default, can be any supported font} |
|
37 |
+\item{family}{"sans" by default, can be any supported font.} |
|
38 | 38 |
|
39 |
-\item{parse}{if TRUE, the labels will be parsed as expressions} |
|
39 |
+\item{parse}{if 'TRUE', the labels will be parsed as expressions, defaults to 'FALSE'.} |
|
40 | 40 |
|
41 |
-\item{nudge_x}{horizontal adjustment} |
|
41 |
+\item{nudge_x}{adjust the horizontal position of the labels.} |
|
42 | 42 |
|
43 |
-\item{nudge_y}{vertical adjustment} |
|
43 |
+\item{nudge_y}{adjust the vertical position of the labels.} |
|
44 | 44 |
|
45 |
-\item{label.padding}{Amount of padding around label.} |
|
45 |
+\item{label.padding}{Amount of padding around label, defaults to 'unit(0.25, "lines")'.} |
|
46 | 46 |
|
47 |
-\item{label.r}{Radius of rounded corners.} |
|
47 |
+\item{label.r}{Use to set the radius of rounded corners of the label, defaults to 'unit(0.15, "lines")'.} |
|
48 | 48 |
|
49 |
-\item{label.size}{Size of label border, in mm} |
|
49 |
+\item{label.size}{Size of label border, in mm, defaults to 0.25.} |
|
50 | 50 |
|
51 |
-\item{na.rm}{logical} |
|
51 |
+\item{na.rm}{If "FALSE" (default), missing values are removed with a warning. If "TRUE", missing values are silently removed, logical.} |
|
52 | 52 |
|
53 |
-\item{show.legend}{logical} |
|
53 |
+\item{show.legend}{Whether to show legend, logical, defaults to "NA".} |
|
54 | 54 |
|
55 |
-\item{inherit.aes}{logical} |
|
55 |
+\item{inherit.aes}{Whether to inherit aesthetic mappings, logical, defaults to "TRUE".} |
|
56 | 56 |
} |
57 | 57 |
\value{ |
58 | 58 |
label layer |
... | ... |
@@ -60,6 +60,21 @@ label layer |
60 | 60 |
\description{ |
61 | 61 |
geom_label2 support aes(subset) via setup_data |
62 | 62 |
} |
63 |
+\details{ |
|
64 |
+'geom_label2' is a modified version of geom_label, with subset aesthetic supported |
|
65 |
+} |
|
66 |
+\examples{ |
|
67 |
+library(ggtree) |
|
68 |
+set.seed(123) |
|
69 |
+tr<- rtree(15) |
|
70 |
+x <- ggtree(tr) |
|
71 |
+x + geom_label2(aes(label = node, subset = isTip == FALSE)) |
|
72 |
+} |
|
73 |
+\references{ |
|
74 |
+For more detailed demonstration of this function, please refer to chapter A.4.5 of |
|
75 |
+\emph{Data Integration, Manipulation and Visualization of Phylogenetic Trees} |
|
76 |
+\url{http://yulab-smu.top/treedata-book/index.html} by Guangchuang Yu. |
|
77 |
+} |
|
63 | 78 |
\seealso{ |
64 | 79 |
\link[ggplot2:geom_text]{geom_label} |
65 | 80 |
} |
... | ... |
@@ -4,11 +4,23 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_label2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., stat = "identity", |
|
8 |
- position = "identity", family = "sans", parse = FALSE, |
|
9 |
- nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
10 |
- label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
11 |
- show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2( |
|
8 |
+ mapping = NULL, |
|
9 |
+ data = NULL, |
|
10 |
+ ..., |
|
11 |
+ stat = "identity", |
|
12 |
+ position = "identity", |
|
13 |
+ family = "sans", |
|
14 |
+ parse = FALSE, |
|
15 |
+ nudge_x = 0, |
|
16 |
+ nudge_y = 0, |
|
17 |
+ label.padding = unit(0.25, "lines"), |
|
18 |
+ label.r = unit(0.15, "lines"), |
|
19 |
+ label.size = 0.25, |
|
20 |
+ na.rm = TRUE, |
|
21 |
+ show.legend = NA, |
|
22 |
+ inherit.aes = TRUE |
|
23 |
+) |
|
12 | 24 |
} |
13 | 25 |
\arguments{ |
14 | 26 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -24,7 +24,7 @@ only needed if you want to override the plot defaults.} |
24 | 24 |
|
25 | 25 |
\item{family}{sans by default, can be any supported font} |
26 | 26 |
|
27 |
-\item{parse}{if TRUE, the labels will be passd into expressions} |
|
27 |
+\item{parse}{if TRUE, the labels will be parsed as expressions} |
|
28 | 28 |
|
29 | 29 |
\item{nudge_x}{horizontal adjustment} |
30 | 30 |
|
... | ... |
@@ -5,10 +5,10 @@ |
5 | 5 |
\title{geom_label2} |
6 | 6 |
\usage{ |
7 | 7 |
geom_label2(mapping = NULL, data = NULL, ..., stat = "identity", |
8 |
- position = "identity", family = "sans", parse = FALSE, nudge_x = 0, |
|
9 |
- nudge_y = 0, label.padding = unit(0.25, "lines"), label.r = unit(0.15, |
|
10 |
- "lines"), label.size = 0.25, na.rm = TRUE, show.legend = NA, |
|
11 |
- inherit.aes = TRUE) |
|
8 |
+ position = "identity", family = "sans", parse = FALSE, |
|
9 |
+ nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
10 |
+ label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
11 |
+ show.legend = NA, inherit.aes = TRUE) |
|
12 | 12 |
} |
13 | 13 |
\arguments{ |
14 | 14 |
\item{mapping}{the aesthetic mapping} |
Merge remote-tracking branch 'upstream/master'
# Conflicts:
# R/geom_cladelabel.R
# R/geom_hilight.R
... | ... |
@@ -4,10 +4,11 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_label2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., position = "identity", |
|
8 |
- family = "sans", parse = FALSE, nudge_x = 0, nudge_y = 0, |
|
9 |
- label.padding = unit(0.25, "lines"), label.r = unit(0.15, "lines"), |
|
10 |
- label.size = 0.25, na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., stat = "identity", |
|
8 |
+ position = "identity", family = "sans", parse = FALSE, nudge_x = 0, |
|
9 |
+ nudge_y = 0, label.padding = unit(0.25, "lines"), label.r = unit(0.15, |
|
10 |
+ "lines"), label.size = 0.25, na.rm = TRUE, show.legend = NA, |
|
11 |
+ inherit.aes = TRUE) |
|
11 | 12 |
} |
12 | 13 |
\arguments{ |
13 | 14 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -17,6 +18,8 @@ only needed if you want to override he plot defaults.} |
17 | 18 |
|
18 | 19 |
\item{...}{other arguments passed on to 'layer'} |
19 | 20 |
|
21 |
+\item{stat}{Name of stat to modify data} |
|
22 |
+ |
|
20 | 23 |
\item{position}{The position adjustment to use for overlapping points on this layer} |
21 | 24 |
|
22 | 25 |
\item{family}{sans by default, can be any supported font} |
Fixed layoutDaylight ave_change calculation.
Fixed bug in getTreeArcAngles() for cases where the branch root node and origin node are the same.
Added getNodeEuclDistances() function.
Fixed isTip() function to check if nodes has children, instead of checking of the data variable had the isTip field set.
... | ... |
@@ -13,7 +13,7 @@ geom_label2(mapping = NULL, data = NULL, ..., position = "identity", |
13 | 13 |
\item{mapping}{the aesthetic mapping} |
14 | 14 |
|
15 | 15 |
\item{data}{A layer specific dataset - |
16 |
-only needed if you want to override he plot defaults.} |
|
16 |
+only needed if you want to override the plot defaults.} |
|
17 | 17 |
|
18 | 18 |
\item{...}{other arguments passed on to 'layer'} |
19 | 19 |
|
... | ... |
@@ -45,10 +45,9 @@ label layer |
45 | 45 |
\description{ |
46 | 46 |
geom_label2 support aes(subset) via setup_data |
47 | 47 |
} |
48 |
-\author{ |
|
49 |
-Guangchuang Yu |
|
50 |
-} |
|
51 | 48 |
\seealso{ |
52 | 49 |
\link[ggplot2]{geom_label} |
53 | 50 |
} |
54 |
- |
|
51 |
+\author{ |
|
52 |
+Guangchuang Yu |
|
53 |
+} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@127093 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -4,10 +4,10 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_label2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
|
8 |
- parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
|
9 |
- "lines"), label.r = unit(0.15, "lines"), label.size = 0.25, |
|
10 |
- na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., position = "identity", |
|
8 |
+ family = "sans", parse = FALSE, nudge_x = 0, nudge_y = 0, |
|
9 |
+ label.padding = unit(0.25, "lines"), label.r = unit(0.15, "lines"), |
|
10 |
+ label.size = 0.25, na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -17,6 +17,8 @@ only needed if you want to override he plot defaults.} |
17 | 17 |
|
18 | 18 |
\item{...}{other arguments passed on to 'layer'} |
19 | 19 |
|
20 |
+\item{position}{The position adjustment to use for overlapping points on this layer} |
|
21 |
+ |
|
20 | 22 |
\item{family}{sans by default, can be any supported font} |
21 | 23 |
|
22 | 24 |
\item{parse}{if TRUE, the labels will be passd into expressions} |
... | ... |
@@ -4,10 +4,10 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_label2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
|
8 |
- parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
|
9 |
- "lines"), label.r = unit(0.15, "lines"), label.size = 0.25, |
|
10 |
- na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., position = "identity", |
|
8 |
+ family = "sans", parse = FALSE, nudge_x = 0, nudge_y = 0, |
|
9 |
+ label.padding = unit(0.25, "lines"), label.r = unit(0.15, "lines"), |
|
10 |
+ label.size = 0.25, na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -17,6 +17,8 @@ only needed if you want to override he plot defaults.} |
17 | 17 |
|
18 | 18 |
\item{...}{other arguments passed on to 'layer'} |
19 | 19 |
|
20 |
+\item{position}{The position adjustment to use for overlapping points on this layer} |
|
21 |
+ |
|
20 | 22 |
\item{family}{sans by default, can be any supported font} |
21 | 23 |
|
22 | 24 |
\item{parse}{if TRUE, the labels will be passd into expressions} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@127021 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
% Please edit documentation in R/geom_label.R |
3 | 3 |
\name{geom_label2} |
4 | 4 |
\alias{geom_label2} |
5 |
-\title{geom_text2} |
|
5 |
+\title{geom_label2} |
|
6 | 6 |
\usage{ |
7 | 7 |
geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
8 | 8 |
parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
... | ... |
@@ -41,7 +41,7 @@ only needed if you want to override he plot defaults.} |
41 | 41 |
label layer |
42 | 42 |
} |
43 | 43 |
\description{ |
44 |
-geom_text2 support aes(subset) via setup_data |
|
44 |
+geom_label2 support aes(subset) via setup_data |
|
45 | 45 |
} |
46 | 46 |
\author{ |
47 | 47 |
Guangchuang Yu |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
% Please edit documentation in R/geom_label.R |
3 | 3 |
\name{geom_label2} |
4 | 4 |
\alias{geom_label2} |
5 |
-\title{geom_text2} |
|
5 |
+\title{geom_label2} |
|
6 | 6 |
\usage{ |
7 | 7 |
geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
8 | 8 |
parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
... | ... |
@@ -41,7 +41,7 @@ only needed if you want to override he plot defaults.} |
41 | 41 |
label layer |
42 | 42 |
} |
43 | 43 |
\description{ |
44 |
-geom_text2 support aes(subset) via setup_data |
|
44 |
+geom_label2 support aes(subset) via setup_data |
|
45 | 45 |
} |
46 | 46 |
\author{ |
47 | 47 |
Guangchuang Yu |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@126768 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -4,10 +4,10 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_text2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., parse = FALSE, |
|
8 |
- nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
9 |
- label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
10 |
- show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
|
8 |
+ parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
|
9 |
+ "lines"), label.r = unit(0.15, "lines"), label.size = 0.25, |
|
10 |
+ na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -17,6 +17,8 @@ only needed if you want to override he plot defaults.} |
17 | 17 |
|
18 | 18 |
\item{...}{other arguments passed on to 'layer'} |
19 | 19 |
|
20 |
+\item{family}{sans by default, can be any supported font} |
|
21 |
+ |
|
20 | 22 |
\item{parse}{if TRUE, the labels will be passd into expressions} |
21 | 23 |
|
22 | 24 |
\item{nudge_x}{horizontal adjustment} |
... | ... |
@@ -4,10 +4,10 @@ |
4 | 4 |
\alias{geom_label2} |
5 | 5 |
\title{geom_text2} |
6 | 6 |
\usage{ |
7 |
-geom_label2(mapping = NULL, data = NULL, ..., parse = FALSE, |
|
8 |
- nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
9 |
- label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
10 |
- show.legend = NA, inherit.aes = TRUE) |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., family = "sans", |
|
8 |
+ parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, |
|
9 |
+ "lines"), label.r = unit(0.15, "lines"), label.size = 0.25, |
|
10 |
+ na.rm = TRUE, show.legend = NA, inherit.aes = TRUE) |
|
11 | 11 |
} |
12 | 12 |
\arguments{ |
13 | 13 |
\item{mapping}{the aesthetic mapping} |
... | ... |
@@ -17,6 +17,8 @@ only needed if you want to override he plot defaults.} |
17 | 17 |
|
18 | 18 |
\item{...}{other arguments passed on to 'layer'} |
19 | 19 |
|
20 |
+\item{family}{sans by default, can be any supported font} |
|
21 |
+ |
|
20 | 22 |
\item{parse}{if TRUE, the labels will be passd into expressions} |
21 | 23 |
|
22 | 24 |
\item{nudge_x}{horizontal adjustment} |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@115937 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/geom_label.R |
|
3 |
+\name{geom_label2} |
|
4 |
+\alias{geom_label2} |
|
5 |
+\title{geom_text2} |
|
6 |
+\usage{ |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., parse = FALSE, |
|
8 |
+ nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
9 |
+ label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
10 |
+ show.legend = NA, inherit.aes = TRUE) |
|
11 |
+} |
|
12 |
+\arguments{ |
|
13 |
+\item{mapping}{the aesthetic mapping} |
|
14 |
+ |
|
15 |
+\item{data}{A layer specific dataset - |
|
16 |
+only needed if you want to override he plot defaults.} |
|
17 |
+ |
|
18 |
+\item{...}{other arguments passed on to 'layer'} |
|
19 |
+ |
|
20 |
+\item{parse}{if TRUE, the labels will be passd into expressions} |
|
21 |
+ |
|
22 |
+\item{nudge_x}{horizontal adjustment} |
|
23 |
+ |
|
24 |
+\item{nudge_y}{vertical adjustment} |
|
25 |
+ |
|
26 |
+\item{label.padding}{Amount of padding around label.} |
|
27 |
+ |
|
28 |
+\item{label.r}{Radius of rounded corners.} |
|
29 |
+ |
|
30 |
+\item{label.size}{Size of label border, in mm} |
|
31 |
+ |
|
32 |
+\item{na.rm}{logical} |
|
33 |
+ |
|
34 |
+\item{show.legend}{logical} |
|
35 |
+ |
|
36 |
+\item{inherit.aes}{logical} |
|
37 |
+} |
|
38 |
+\value{ |
|
39 |
+label layer |
|
40 |
+} |
|
41 |
+\description{ |
|
42 |
+geom_text2 support aes(subset) via setup_data |
|
43 |
+} |
|
44 |
+\author{ |
|
45 |
+Guangchuang Yu |
|
46 |
+} |
|
47 |
+\seealso{ |
|
48 |
+\link[ggplot2]{geom_label} |
|
49 |
+} |
|
50 |
+ |
git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@115937 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,50 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/geom_label.R |
|
3 |
+\name{geom_label2} |
|
4 |
+\alias{geom_label2} |
|
5 |
+\title{geom_text2} |
|
6 |
+\usage{ |
|
7 |
+geom_label2(mapping = NULL, data = NULL, ..., parse = FALSE, |
|
8 |
+ nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"), |
|
9 |
+ label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE, |
|
10 |
+ show.legend = NA, inherit.aes = TRUE) |
|
11 |
+} |
|
12 |
+\arguments{ |
|
13 |
+\item{mapping}{the aesthetic mapping} |
|
14 |
+ |
|
15 |
+\item{data}{A layer specific dataset - |
|
16 |
+only needed if you want to override he plot defaults.} |
|
17 |
+ |
|
18 |
+\item{...}{other arguments passed on to 'layer'} |
|
19 |
+ |
|
20 |
+\item{parse}{if TRUE, the labels will be passd into expressions} |
|
21 |
+ |
|
22 |
+\item{nudge_x}{horizontal adjustment} |
|
23 |
+ |
|
24 |
+\item{nudge_y}{vertical adjustment} |
|
25 |
+ |
|
26 |
+\item{label.padding}{Amount of padding around label.} |
|
27 |
+ |
|
28 |
+\item{label.r}{Radius of rounded corners.} |
|
29 |
+ |
|
30 |
+\item{label.size}{Size of label border, in mm} |
|
31 |
+ |
|
32 |
+\item{na.rm}{logical} |
|
33 |
+ |
|
34 |
+\item{show.legend}{logical} |
|
35 |
+ |
|
36 |
+\item{inherit.aes}{logical} |
|
37 |
+} |
|
38 |
+\value{ |
|
39 |
+label layer |
|
40 |
+} |
|
41 |
+\description{ |
|
42 |
+geom_text2 support aes(subset) via setup_data |
|
43 |
+} |
|
44 |
+\author{ |
|
45 |
+Guangchuang Yu |
|
46 |
+} |
|
47 |
+\seealso{ |
|
48 |
+\link[ggplot2]{geom_label} |
|
49 |
+} |
|
50 |
+ |