Skip to content

Commit 9f89495

Browse files
authored
Additional minor edits to ggplot() docstring
* Move closing parentheses in example code for aes() * Remove trailing } accidentally left behind
1 parent aab9f2a commit 9f89495

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

R/plot.r

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,22 @@
5757
#' # positions.
5858
#' ggplot(sample_df, aes(x = group, y = value)) +
5959
#' geom_point() +
60-
#' geom_point(group_means_df, aes(y = group_mean), colour = 'red', size = 3)
60+
#' geom_point(group_means_df, aes(y = group_mean, colour = 'red', size = 3))
6161
#'
6262
#' # Pattern 2
6363
#' # Same plot as above, declaring only the data frame in ggplot().
6464
#' # Note how the x and y aesthetics must now be declared in
6565
#' # each geom_point() layer.
6666
#' ggplot(sample_df) +
6767
#' geom_point(aes(x = group, y = value)) +
68-
#' geom_point(group_means_df, aes(x = group, y = group_mean), colour = 'red', size = 3)
68+
#' geom_point(group_means_df, aes(x = group, y = group_mean, colour = 'red', size = 3))
6969
#'
7070
#' # Pattern 3
7171
#' # Alternatively, we can fully specify the plot in each layer. This
7272
#' # can be particularly useful when working with complex, multi-dataset graphics.
7373
#' ggplot() +
7474
#' geom_point(sample_df, aes(x = group, y = value)) +
75-
#' geom_point(group_means_df, aes(x = group, y = group_mean), colour = 'red', size = 3)
76-
#' }
75+
#' geom_point(group_means_df, aes(x = group, y = group_mean, colour = 'red', size = 3))
7776
ggplot <- function(data = NULL, mapping = aes(), ...,
7877
environment = parent.frame()) {
7978
UseMethod("ggplot")

0 commit comments

Comments
 (0)