Skip to content

Commit 039cd01

Browse files
committed
included more suggestions
1 parent ebb96c6 commit 039cd01

File tree

5 files changed

+35
-15
lines changed

5 files changed

+35
-15
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ ggplot2 1.0.1.9000
5555
* Improved documentation for `aes()` and many geoms and scales. I've tried
5656
to reduce the use of `...` so that you can see all the documentation in one
5757
place rather than having to navigate through multiple pages.
58-
* Added new function geom_curve to add curved lines to plot (similar to
59-
geom_segment to add straight lines). (@veraanadi)
6058

6159
ggplot2 1.0.1
6260
----------------------------------------------------------------

R/geom-curve.r

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "curve")}
55
#'
66
#' @inheritParams grid::curveGrob
7-
#' @param curvature A numeric value giving the amount of curvature. Negative values produce left-hand curves, positive values produce right-hand curves, and zero produces a straight line. (see curveGrob)
8-
#' @param angle A numeric value between 0 and 180, giving an amount to skew the control points of the curve. Values less than 90 skew the curve towards the start point and values greater than 90 skew the curve towards the end point. (see curveGrob)
9-
#' @param ncp The number of control points used to draw the curve. More control points creates a smoother curve. (see curveGrob)
10-
#' @param arrow specification for arrow heads, as created by arrow()
11-
#' @param lineend Line end style (round, butt, square)
7+
#' @inheritParams geom_point
8+
#' @inheritParams geom_segment
9+
#'
1210
#' @seealso \code{\link{geom_segment}}, \code{\link{geom_path}} and \code{\link{geom_line}} for multi-
1311
#' segment lines and paths.
1412
#' @export
@@ -48,8 +46,8 @@ GeomCurve <- proto(Geom, {
4846
curvature=curvature, angle=angle, ncp=ncp,
4947
square = FALSE, squareShape = 1,
5048
inflect = FALSE, open = TRUE,
51-
gp = gpar(col=alpha(colour, alpha), fill = alpha(colour, alpha),
52-
lwd=size * .pt, lty=linetype, lineend = lineend),
49+
gp = gpar(col=alpha(colour, alpha), lwd=size * .pt,
50+
lty=linetype, lineend = lineend),
5351
arrow = arrow)
5452
))
5553
}

man/geom_bar.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ m + geom_bar()
145145
}
146146
}
147147
\seealso{
148-
\code{\link{stat_bin}} for more details of the binning alogirithm,
148+
\code{\link{stat_bin}} for more details of the binning algorithm,
149149
\code{\link{position_dodge}} for creating side-by-side barcharts,
150150
\code{\link{position_stack}} for more info on stacking,
151151
}

man/geom_curve.Rd

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,40 @@ geom_curve(mapping = NULL, data = NULL, stat = "identity",
99
arrow = NULL, lineend = "butt", na.rm = FALSE, ...)
1010
}
1111
\arguments{
12-
\item{curvature}{A numeric value giving the amount of curvature. Negative values produce left-hand curves, positive values produce right-hand curves, and zero produces a straight line. (see curveGrob)}
12+
\item{mapping}{The aesthetic mapping, usually constructed with
13+
\code{\link{aes}} or \code{\link{aes_string}}. Only needs to be set
14+
at the layer level if you are overriding the plot defaults.}
1315

14-
\item{angle}{A numeric value between 0 and 180, giving an amount to skew the control points of the curve. Values less than 90 skew the curve towards the start point and values greater than 90 skew the curve towards the end point. (see curveGrob)}
16+
\item{data}{A layer specific dataset - only needed if you want to override
17+
the plot defaults.}
1518

16-
\item{ncp}{The number of control points used to draw the curve. More control points creates a smoother curve. (see curveGrob)}
19+
\item{stat}{The statistical transformation to use on the data for this
20+
layer.}
1721

18-
\item{arrow}{specification for arrow heads, as created by arrow()}
22+
\item{position}{The position adjustment to use for overlapping points
23+
on this layer}
24+
25+
\item{curvature}{A numeric value giving the amount of curvature.
26+
Negative values produce left-hand curves, positive values
27+
produce right-hand curves, and zero produces a straight line.}
28+
29+
\item{angle}{A numeric value between 0 and 180,
30+
giving an amount to skew the control
31+
points of the curve. Values less than 90 skew the curve towards
32+
the start point and values greater than 90 skew the curve
33+
towards the end point.}
34+
35+
\item{ncp}{The number of control points used to draw the curve.
36+
More control points creates a smoother curve.}
37+
38+
\item{arrow}{A list describing arrow heads to place at either end
39+
of the curve, as produced by the \code{arrow} function.}
1940

2041
\item{lineend}{Line end style (round, butt, square)}
2142

43+
\item{na.rm}{If \code{FALSE} (the default), removes missing values with
44+
a warning. If \code{TRUE} silently removes missing values.}
45+
2246
\item{...}{Arguments to be passed to \code{curveGrob}.}
2347
}
2448
\description{

man/geom_density2d.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include aesthetics whose values you want to set, not map. See
3636
\code{\link{layer}} for more details.}
3737
}
3838
\description{
39-
Perform a 2D kernel density estimatation using kde2d and display the
39+
Perform a 2D kernel density estimation using kde2d and display the
4040
results with contours.
4141
}
4242
\details{

0 commit comments

Comments
 (0)