Skip to content

Commit abfcd2f

Browse files
committed
Documentation improvements for website
1 parent 4bb6aa3 commit abfcd2f

13 files changed

+120
-38
lines changed

NAMESPACE

-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export(scale_shape_discrete)
151151
export(scale_shape_identity)
152152
export(scale_shape_manual)
153153
export(scale_shape)
154-
export(scale_size_continuous)
155154
export(scale_size_discrete)
156155
export(scale_size_identity)
157156
export(scale_size_manual)

R/ggplot2.r

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#'
33
#' @name ggplot2
44
#' @docType package
5-
#' @aliases ggplot2 package-ggplot2
65
#' @import plyr digest scales grid reshape2 memoise proto
76
NULL
87

R/labels.r

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ update_labels <- function(p, labels) {
1717
#' Change axis labels and legend titles
1818
#'
1919
#' @param ... a list of new names in the form aesthetic = "new name"
20-
#' @aliases labs xlab ylab
21-
#' @export labs xlab ylab
2220
#' @examples
2321
#' p <- qplot(mpg, wt, data = mtcars)
2422
#' p + labs(x = "New x label")
@@ -43,9 +41,13 @@ labs <- function(...) {
4341
structure(args, class = "labels")
4442
}
4543

44+
#' @rdname labs
45+
#' @export
4646
xlab <- function(label) {
4747
labs(x = label)
4848
}
49+
#' @rdname labs
50+
#' @export
4951
ylab <- function(label) {
5052
labs(y = label)
5153
}

R/scale-identity.r

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#' Use values without scaling.
22
#'
3+
#' @name scale_identity
34
#' @param ... Other arguments passed on to \code{\link{discrete_scale}} or
45
#' \code{\link{continuous_scale}}
56
#' @param guide Guide to use for this scale - defaults to \code{"none"}.
6-
#' @rdname scale_identity
7-
#' @export
87
#' @examples
98
#' colour <- c("red", "green", "blue", "yellow")
109
#' qplot(1:4, 1:4, fill = colour, geom = "tile")
@@ -23,6 +22,9 @@
2322
#'
2423
#' # cyl used as point size
2524
#' qplot(mpg, wt, data = mtcars, size = cyl) + scale_size_identity()
25+
26+
#' @rdname scale_identity
27+
#' @export scale_colour_identity
2628
scale_colour_identity <- function(..., guide = "none") {
2729
identity_scale(discrete_scale("colour", "identity", identity_pal(), ..., guide = guide))
2830
}

R/scale-manual.r

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#' Create your own discrete scale.
22
#'
3-
#' @rdname scale_manual
3+
#' @name scale_manual
44
#' @inheritParams scale_x_discrete
55
#' @param values a set of aesthetic values to map data values to. If this
66
#' is a named vector, then the values will be matched based on the names.
77
#' If unnamed, values will be matched in order (usually alphabetical, but
88
#' could be modified with the limits argument to the scale). Any data
99
#' values that don't match, will be given \code{na.value}.
10-
#' @export
1110
#' @examples
1211
#' \donttest{
1312
#' p <- qplot(mpg, wt, data = mtcars, colour = factor(cyl))
@@ -31,6 +30,9 @@
3130
#' p + scale_colour_manual(values = cols, limits = c("4", "8"))
3231
#' p + scale_colour_manual(values = cols, limits = c("4", "6", "8", "10"))
3332
#' }
33+
34+
#' @rdname scale_manual
35+
#' @export scale_colour_manual
3436
scale_colour_manual <- function(..., values) {
3537
manual_scale("colour", values, ...)
3638
}

R/scale-size.r

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @inheritParams scale_x_continuous
44
#' @param range a numeric vector of length 2 that specifies the minimum and
55
#' maximum size of the plotting symbol after transformation.
6-
#' @rdname scale_size
6+
#' @name scale_size
77
#' @export
88
#' @examples
99
#' \donttest{

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ examples of ggplot in use. If you're interested, you can also sign up to
1616
the ggplot2 mailing list at http://groups.google.com/group/ggplot2, or track
1717
development at http://github.com/hadley/ggplot2
1818

19-
# Development
19+
## Development
2020

2121
To install the development version of ggplot2, it's easiest to use the `devtools` package:
2222

man/ggplot2.Rd

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
\name{ggplot2}
33
\alias{ggplot2}
44
\alias{ggplot2-package}
5-
\alias{package-ggplot2}
65
\title{ggplot2.}
76
\description{
87
ggplot2.

man/opts.Rd

+6-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@
4444
\cr panel.grid.major \tab major grid lines \cr
4545
panel.grid.minor \tab minor grid lines \cr
4646
plot.background \tab background of the entire plot \cr
47-
plot.title \tab plot title \cr plot.margin \tab plot
48-
margins \cr strip.background \tab background of facet
49-
labels \cr strip.text.x \tab text for horizontal strips
50-
\cr strip.text.y \tab text for vertical strips \cr }
47+
plot.title \tab plot title (text appearance) \cr
48+
plot.margin \tab plot margins \cr strip.background \tab
49+
background of facet labels \cr strip.text.x \tab text for
50+
horizontal strips \cr strip.text.y \tab text for vertical
51+
strips \cr title \tab A string containing the title of
52+
the plot \cr }
5153
}
5254
\examples{
5355
\donttest{

man/scale_identity.Rd

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
\name{scale_colour_identity}
1+
\name{scale_identity}
22
\alias{scale_alpha_identity}
33
\alias{scale_color_identity}
4-
\alias{scale_colour_identity}
54
\alias{scale_fill_identity}
5+
\alias{scale_identity}
66
\alias{scale_linetype_identity}
77
\alias{scale_shape_identity}
88
\alias{scale_size_identity}

man/scale_manual.Rd

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
\name{scale_colour_manual}
1+
\name{scale_manual}
22
\alias{scale_alpha_manual}
33
\alias{scale_color_manual}
4-
\alias{scale_colour_manual}
54
\alias{scale_fill_manual}
65
\alias{scale_linetype_manual}
6+
\alias{scale_manual}
77
\alias{scale_shape_manual}
88
\alias{scale_size_manual}
99
\title{Create your own discrete scale.}

man/scale_size.Rd

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
\name{scale_size_continuous}
1+
\name{scale_size}
22
\alias{scale_size}
3-
\alias{scale_size_continuous}
43
\alias{scale_size_discrete}
54
\title{Size scale.}
65
\usage{

staticdocs.r

+95-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
library(staticdocs)
22
list(
3+
readme = "",
34
index = list(
45
sd_section("Geoms",
56
"Geoms, short for geometric objects, describe the type of plot you will produce.",
@@ -14,6 +15,7 @@ list(
1415
"geom_crossbar",
1516
"geom_density",
1617
"geom_density2d",
18+
"geom_dotplot",
1719
"geom_errorbar",
1820
"geom_errorbarh",
1921
"geom_freqpoly",
@@ -23,11 +25,13 @@ list(
2325
"geom_jitter",
2426
"geom_line",
2527
"geom_linerange",
28+
"geom_map",
2629
"geom_path",
2730
"geom_point",
2831
"geom_pointrange",
2932
"geom_polygon",
3033
"geom_quantile",
34+
"geom_raster",
3135
"geom_rect",
3236
"geom_ribbon",
3337
"geom_rug",
@@ -36,59 +40,67 @@ list(
3640
"geom_step",
3741
"geom_text",
3842
"geom_tile",
43+
"geom_violin",
3944
"geom_vline"
4045
)
4146
),
4247
sd_section("Statistics",
4348
"It's often useful to transform your data before plotting, and that's what statistical transformations do.",
4449
c(
45-
"stat_abline",
4650
"stat_bin",
4751
"stat_bin2d",
52+
"stat_bindot",
4853
"stat_binhex",
4954
"stat_boxplot",
5055
"stat_contour",
5156
"stat_density",
5257
"stat_density2d",
5358
"stat_function",
54-
"stat_hline",
5559
"stat_identity",
5660
"stat_qq",
5761
"stat_quantile",
5862
"stat_smooth",
5963
"stat_spoke",
6064
"stat_sum",
6165
"stat_summary",
66+
"stat_summary_hex",
67+
"stat_summary2d",
6268
"stat_unique",
63-
"stat_vline"
69+
"stat_ydensity"
6470
)
6571
),
6672
sd_section("Scales",
6773
"Scales control the mapping between data and aesthetics.",
6874
c(
75+
"expand_limits",
76+
"guide_legend",
77+
"guide_colourbar",
6978
"scale_alpha",
70-
"scale_continuous",
71-
"scale_datetime",
72-
"scale_gradient",
73-
"scale_gradientn",
74-
"scale_hue",
75-
"scale_linetype",
76-
"scale_shape",
77-
"scale_brewer",
78-
"scale_date",
79-
"scale_discrete",
80-
"scale_gradient2",
81-
"scale_grey",
79+
"scale_area",
80+
"scale_colour_gradient2",
81+
"scale_colour_gradientn",
82+
"scale_colour_grey",
83+
"scale_colour_hue",
8284
"scale_identity",
8385
"scale_manual",
84-
"scale_size"
86+
"scale_linetype",
87+
"scale_shape",
88+
"scale_size",
89+
"scale_x_continuous",
90+
"scale_x_date",
91+
"scale_x_datetime",
92+
"scale_x_discrete",
93+
"labs",
94+
"update_labels",
95+
"xlim",
96+
"ylim"
8597
)
8698
),
8799
sd_section("Coordinate systems",
88100
"Coordinate systems adjust the mapping from coordinates to the 2d plane of the computer screen.",
89101
c(
90102
"coord_cartesian",
91-
"coord_equal",
103+
"coord_fixed",
92104
"coord_flip",
93105
"coord_map",
94106
"coord_polar",
@@ -100,6 +112,7 @@ list(
100112
"Facets display subsets of the dataset in different panels.",
101113
c(
102114
"facet_grid",
115+
"facet_null",
103116
"facet_wrap"
104117
)
105118
),
@@ -113,7 +126,72 @@ list(
113126
"position_stack",
114127
"position_jitter"
115128
)
129+
),
130+
sd_section("Data",
131+
"Data sets included in ggplot2 and used in examples",
132+
c(
133+
"diamonds",
134+
"economics",
135+
"midwest",
136+
"movies",
137+
"mpg",
138+
"msleep",
139+
"presidential",
140+
"seals"
141+
)
142+
),
143+
sd_section("Anotation",
144+
"Specialised functions for adding annotations to a plot",
145+
c(
146+
"annotate",
147+
"annotation_custom",
148+
"annotation_logticks",
149+
"annotation_map",
150+
"annotation_raster",
151+
"borders"
152+
)
153+
),
154+
sd_section("Fortify",
155+
"Fortify methods make it possible to use ggplot2 with objects of
156+
various types, not just data frames.",
157+
c(
158+
"fortify",
159+
"fortify-multcomp",
160+
"fortify.lm",
161+
"fortify.map",
162+
"fortify.sp",
163+
"map_data"
164+
)
165+
),
166+
sd_section("Themes",
167+
"Themes control non-data components of the plot",
168+
c(
169+
"opts",
170+
"theme_blank",
171+
"theme_bw",
172+
"theme_grey",
173+
"theme_line",
174+
"theme_rect",
175+
"theme_segment",
176+
"theme_text",
177+
"theme_update",
178+
"update_element"
179+
)
180+
),
181+
sd_section("Aesthetics",
182+
"",
183+
c(
184+
"aes",
185+
"aes_all",
186+
"aes_auto",
187+
"aes_string",
188+
"aes_colour_fill_alpha",
189+
"aes_group_order",
190+
"aes_linetype_size_shape",
191+
"aes_position"
192+
)
116193
)
194+
117195
),
118196
icons = list(
119197
coord_polar = sd_icon({

0 commit comments

Comments
 (0)