Browse code

rename size aesthetic according to ggplot2 (3.4.0)

xiangpin authored on 07/07/2022 12:57:13
Showing 1 changed files
... ...
@@ -36,7 +36,7 @@ a list object.
36 36
 }
37 37
 \description{
38 38
 \code{geom_taxalink} supports data.frame as input,
39
-the \code{colour}, \code{size}, \code{linetype} and \code{alpha} can be mapped. When the \code{data} was provided,
39
+the \code{colour}, \code{linewidth}, \code{linetype} and \code{alpha} can be mapped. When the \code{data} was provided,
40 40
 the \code{mapping} should be also provided, which \code{taxa1} and \code{taxa2} should be mapped created
41 41
 by \code{aes}, \code{aes_} or \code{aes_string}. In addition, the \code{hratio}, control the height of curve line,
42 42
 when tree layout is \code{cirular}, default is 1. \code{ncp}, the number of control points used to draw the
... ...
@@ -52,7 +52,7 @@ a column of data.
52 52
 \item \code{group} group category of link.
53 53
 \item \code{colour} control the color of line, default is black.
54 54
 \item \code{linetype} control the type of line, default is 1 (solid).
55
-\item \code{size} control the width of line, default is 0.5.
55
+\item \code{linewidth} control the width of line, default is 0.5.
56 56
 \item \code{curvature} control the curvature of line, default is 0.5,
57 57
 it will be created automatically in polar coordinate .
58 58
 \item \code{hratio} control the height of curve line, default is 1.
Browse code

update rd of geom_taxalink

xiangpin authored on 23/07/2020 06:30:01
Showing 1 changed files
... ...
@@ -47,15 +47,16 @@ a column of data.
47 47
 
48 48
 \code{geom_taxalink()} understands the following aesthethics (required aesthetics are in bold):
49 49
 \itemize{
50
-\item \strong{\code{taxa1}}
51
-\item \strong{\code{taxa2}}
52
-\item \code{group}
53
-\item \code{colour}
54
-\item \code{linetype}
55
-\item \code{size}
56
-\item \code{curvature}
57
-\item \code{hratio}
58
-\item \code{ncp}
50
+\item \strong{\code{taxa1}} label or node number of tree.
51
+\item \strong{\code{taxa2}} label or node number of tree.
52
+\item \code{group} group category of link.
53
+\item \code{colour} control the color of line, default is black.
54
+\item \code{linetype} control the type of line, default is 1 (solid).
55
+\item \code{size} control the width of line, default is 0.5.
56
+\item \code{curvature} control the curvature of line, default is 0.5,
57
+it will be created automatically in polar coordinate .
58
+\item \code{hratio} control the height of curve line, default is 1.
59
+\item \code{ncp} control the smooth of curve line, default is 1.
59 60
 }
60 61
 }
61 62
 
Browse code

geom_taxalink supports aes mapping

Guangchuang Yu authored on 20/07/2020 14:59:17
Showing 1 changed files
... ...
@@ -2,49 +2,60 @@
2 2
 % Please edit documentation in R/geom_taxalink.R
3 3
 \name{geom_taxalink}
4 4
 \alias{geom_taxalink}
5
-\title{geom_taxalink}
5
+\title{link between taxa}
6 6
 \usage{
7 7
 geom_taxalink(
8
-  taxa1,
9
-  taxa2,
10
-  curvature = 0.5,
11
-  arrow = NULL,
12
-  arrow.fill = NULL,
8
+  data = NULL,
9
+  mapping = NULL,
10
+  taxa1 = NULL,
11
+  taxa2 = NULL,
13 12
   offset = NULL,
14
-  hratio = 1,
15
-  outward = TRUE,
13
+  outward = "auto",
16 14
   ...
17 15
 )
18 16
 }
19 17
 \arguments{
20
-\item{taxa1}{taxa1, can be label or node number}
18
+\item{data}{data.frame, The data to be displayed in this layer, default is NULL.}
21 19
 
22
-\item{taxa2}{taxa2, can be label or node number}
20
+\item{mapping}{Set of aesthetic mappings, default is NULL.}
23 21
 
24
-\item{curvature}{A numeric value giving the amount of curvature.
25
-Negative values produce left-hand curves,
26
-positive values produce right-hand curves, and zero produces a straight line.}
22
+\item{taxa1}{can be label or node number.}
27 23
 
28
-\item{arrow}{specification for arrow heads, as created by arrow().}
29
-
30
-\item{arrow.fill}{fill color to usse for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.}
24
+\item{taxa2}{can be label or node number.}
31 25
 
32 26
 \item{offset}{numeric, control the shift of curve line (the ratio of axis value,
33 27
 range is "(0-1)"), default is NULL.}
34 28
 
35
-\item{hratio}{numeric, the height of curve line, default is 1.}
36
-
37 29
 \item{outward}{logical, control the orientation of curve when the layout of tree is circular,
38
-fan or other layout in polar coordinate, default is TRUE.}
30
+fan or other layout in polar coordinate, default is "auto", meaning It will automatically.}
39 31
 
40
-\item{...}{additional parameter.}
32
+\item{..., }{additional parameter.}
41 33
 }
42 34
 \value{
43
-ggplot layer
35
+a list object.
44 36
 }
45 37
 \description{
46
-link between taxa
38
+\code{geom_taxalink} supports data.frame as input,
39
+the \code{colour}, \code{size}, \code{linetype} and \code{alpha} can be mapped. When the \code{data} was provided,
40
+the \code{mapping} should be also provided, which \code{taxa1} and \code{taxa2} should be mapped created
41
+by \code{aes}, \code{aes_} or \code{aes_string}. In addition, the \code{hratio}, control the height of curve line,
42
+when tree layout is \code{cirular}, default is 1. \code{ncp}, the number of control points used to draw the
43
+curve, more control points creates a smoother curve, default is 1. They also can be mapped to
44
+a column of data.
47 45
 }
48
-\author{
49
-Guangchuang Yu
46
+\section{Aesthetics}{
47
+
48
+\code{geom_taxalink()} understands the following aesthethics (required aesthetics are in bold):
49
+\itemize{
50
+\item \strong{\code{taxa1}}
51
+\item \strong{\code{taxa2}}
52
+\item \code{group}
53
+\item \code{colour}
54
+\item \code{linetype}
55
+\item \code{size}
56
+\item \code{curvature}
57
+\item \code{hratio}
58
+\item \code{ncp}
50 59
 }
60
+}
61
+
Browse code

add outward parameter and xexpand to offset

xiangpin authored on 16/07/2020 03:30:18
Showing 1 changed files
... ...
@@ -10,8 +10,9 @@ geom_taxalink(
10 10
   curvature = 0.5,
11 11
   arrow = NULL,
12 12
   arrow.fill = NULL,
13
-  xexpand = NULL,
14
-  hratio = 0.5,
13
+  offset = NULL,
14
+  hratio = 1,
15
+  outward = TRUE,
15 16
   ...
16 17
 )
17 18
 }
... ...
@@ -28,12 +29,15 @@ positive values produce right-hand curves, and zero produces a straight line.}
28 29
 
29 30
 \item{arrow.fill}{fill color to usse for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.}
30 31
 
31
-\item{xexpand}{numeric, control the shift of curve line (the ratio of axis value,
32
-rang is "(0-1)"), default is NULL.}
32
+\item{offset}{numeric, control the shift of curve line (the ratio of axis value,
33
+range is "(0-1)"), default is NULL.}
33 34
 
34
-\item{hratio}{numeric, the height of curve line, default is 0.5.}
35
+\item{hratio}{numeric, the height of curve line, default is 1.}
35 36
 
36
-\item{...}{additional parameter}
37
+\item{outward}{logical, control the orientation of curve when the layout of tree is circular,
38
+fan or other layout in polar coordinate, default is TRUE.}
39
+
40
+\item{...}{additional parameter.}
37 41
 }
38 42
 \value{
39 43
 ggplot layer
Browse code

optimize the method to calculate curvature

xiangpin authored on 13/07/2020 13:36:54
Showing 1 changed files
... ...
@@ -10,6 +10,8 @@ geom_taxalink(
10 10
   curvature = 0.5,
11 11
   arrow = NULL,
12 12
   arrow.fill = NULL,
13
+  xexpand = NULL,
14
+  hratio = 0.5,
13 15
   ...
14 16
 )
15 17
 }
... ...
@@ -26,6 +28,11 @@ positive values produce right-hand curves, and zero produces a straight line.}
26 28
 
27 29
 \item{arrow.fill}{fill color to usse for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.}
28 30
 
31
+\item{xexpand}{numeric, control the shift of curve line (the ratio of axis value,
32
+rang is "(0-1)"), default is NULL.}
33
+
34
+\item{hratio}{numeric, the height of curve line, default is 0.5.}
35
+
29 36
 \item{...}{additional parameter}
30 37
 }
31 38
 \value{
Browse code

clip="off" and update docs

Guangchuang Yu authored on 06/12/2019 03:01:17
Showing 1 changed files
... ...
@@ -4,8 +4,14 @@
4 4
 \alias{geom_taxalink}
5 5
 \title{geom_taxalink}
6 6
 \usage{
7
-geom_taxalink(taxa1, taxa2, curvature = 0.5, arrow = NULL,
8
-  arrow.fill = NULL, ...)
7
+geom_taxalink(
8
+  taxa1,
9
+  taxa2,
10
+  curvature = 0.5,
11
+  arrow = NULL,
12
+  arrow.fill = NULL,
13
+  ...
14
+)
9 15
 }
10 16
 \arguments{
11 17
 \item{taxa1}{taxa1, can be label or node number}
Browse code

roxygen2md

Guangchuang Yu authored on 01/11/2019 04:24:00
Showing 1 changed files
... ...
@@ -18,7 +18,7 @@ positive values produce right-hand curves, and zero produces a straight line.}
18 18
 
19 19
 \item{arrow}{specification for arrow heads, as created by arrow().}
20 20
 
21
-\item{arrow.fill}{fill color to usse for the arrow head (if closed). `NULL` means use `colour` aesthetic.}
21
+\item{arrow.fill}{fill color to usse for the arrow head (if closed). \code{NULL} means use \code{colour} aesthetic.}
22 22
 
23 23
 \item{...}{additional parameter}
24 24
 }
Browse code

compatible with ggplot2-dev

guangchuang yu authored on 02/05/2018 03:48:18
Showing 1 changed files
... ...
@@ -4,7 +4,8 @@
4 4
 \alias{geom_taxalink}
5 5
 \title{geom_taxalink}
6 6
 \usage{
7
-geom_taxalink(taxa1, taxa2, curvature = 0.5, ...)
7
+geom_taxalink(taxa1, taxa2, curvature = 0.5, arrow = NULL,
8
+  arrow.fill = NULL, ...)
8 9
 }
9 10
 \arguments{
10 11
 \item{taxa1}{taxa1, can be label or node number}
... ...
@@ -15,6 +16,10 @@ geom_taxalink(taxa1, taxa2, curvature = 0.5, ...)
15 16
 Negative values produce left-hand curves,
16 17
 positive values produce right-hand curves, and zero produces a straight line.}
17 18
 
19
+\item{arrow}{specification for arrow heads, as created by arrow().}
20
+
21
+\item{arrow.fill}{fill color to usse for the arrow head (if closed). `NULL` means use `colour` aesthetic.}
22
+
18 23
 \item{...}{additional parameter}
19 24
 }
20 25
 \value{
Browse code

geom_motif #148

guangchuang yu authored on 22/08/2017 08:22:37
Showing 1 changed files
... ...
@@ -26,4 +26,3 @@ link between taxa
26 26
 \author{
27 27
 Guangchuang Yu
28 28
 }
29
-
Browse code

update docs

guangchuang yu authored on 16/08/2017 02:36:13
Showing 1 changed files
... ...
@@ -26,3 +26,4 @@ link between taxa
26 26
 \author{
27 27
 Guangchuang Yu
28 28
 }
29
+
Browse code

add extend parameter in geom_cladelabel

guangchuang yu authored on 26/07/2017 02:13:53
Showing 1 changed files
... ...
@@ -26,4 +26,3 @@ link between taxa
26 26
 \author{
27 27
 Guangchuang Yu
28 28
 }
29
-
Browse code

doc consistent

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@115866 bc3139a8-67e5-0310-9ffc-ced21a209358

Guangchuang Yu authored on 06/04/2016 03:21:45
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 \alias{geom_taxalink}
5 5
 \title{geom_taxalink}
6 6
 \usage{
7
-geom_taxalink(taxa1, taxa2, curvature = -0.5, ...)
7
+geom_taxalink(taxa1, taxa2, curvature = 0.5, ...)
8 8
 }
9 9
 \arguments{
10 10
 \item{taxa1}{taxa1, can be label or node number}
Browse code

geom_taxalink

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@115593 bc3139a8-67e5-0310-9ffc-ced21a209358

Guangchuang Yu authored on 01/04/2016 08:22:40
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+% Generated by roxygen2: do not edit by hand
2
+% Please edit documentation in R/geom_taxalink.R
3
+\name{geom_taxalink}
4
+\alias{geom_taxalink}
5
+\title{geom_taxalink}
6
+\usage{
7
+geom_taxalink(taxa1, taxa2, curvature = -0.5, ...)
8
+}
9
+\arguments{
10
+\item{taxa1}{taxa1, can be label or node number}
11
+
12
+\item{taxa2}{taxa2, can be label or node number}
13
+
14
+\item{curvature}{A numeric value giving the amount of curvature.
15
+Negative values produce left-hand curves,
16
+positive values produce right-hand curves, and zero produces a straight line.}
17
+
18
+\item{...}{additional parameter}
19
+}
20
+\value{
21
+ggplot layer
22
+}
23
+\description{
24
+link between taxa
25
+}
26
+\author{
27
+Guangchuang Yu
28
+}
29
+