Permalink
Browse files

Fix document aesthetics.

Fixes #447
  • Loading branch information...
1 parent b16975d commit d7971cbfa772d7909cb57e68b916926d02a79e72 @hadley hadley committed May 23, 2012
Showing with 406 additions and 23 deletions.
  1. +1 −0 DESCRIPTION
  2. +3 −0 R/geom-abline.r
  3. +3 −0 R/geom-bar-.r
  4. +2 −0 R/geom-bar-histogram.r
  5. +3 −0 R/geom-bin2d.r
  6. +3 −0 R/geom-boxplot.r
  7. +3 −0 R/geom-crossbar.r
  8. +3 −0 R/geom-dotplot.r
  9. +3 −0 R/geom-error.r
  10. +3 −0 R/geom-errorh.r
  11. +3 −0 R/geom-freqpoly.r
  12. +3 −0 R/geom-hex.r
  13. +3 −0 R/geom-hline.r
  14. +3 −0 R/geom-linerange.r
  15. +3 −0 R/geom-map.r
  16. +3 −0 R/geom-path-.r
  17. +3 −0 R/geom-path-contour.r
  18. +3 −0 R/geom-path-density2d.r
  19. +3 −0 R/geom-path-line.r
  20. +3 −0 R/geom-path-step.r
  21. +2 −13 R/geom-point-.r
  22. +3 −0 R/geom-point-jitter.r
  23. +3 −0 R/geom-pointrange.r
  24. +3 −0 R/geom-polygon.r
  25. +3 −0 R/geom-quantile.r
  26. +3 −0 R/geom-raster.r
  27. +3 −0 R/geom-rect.r
  28. +3 −0 R/geom-ribbon-.r
  29. +3 −0 R/geom-ribbon-density.r
  30. +3 −0 R/geom-rug.r
  31. +3 −0 R/geom-segment.r
  32. +3 −0 R/geom-smooth.r
  33. +3 −0 R/geom-text.r
  34. +3 −0 R/geom-tile.r
  35. +3 −0 R/geom-violin.r
  36. +3 −0 R/geom-vline.r
  37. +3 −0 R/stat-bin.r
  38. +3 −0 R/stat-bin2d.r
  39. +3 −0 R/stat-bindot.r
  40. +3 −0 R/stat-binhex.r
  41. +3 −0 R/stat-boxplot.r
  42. +3 −0 R/stat-contour.r
  43. +3 −0 R/stat-density-2d.r
  44. +3 −0 R/stat-density.r
  45. +3 −0 R/stat-function.r
  46. +3 −0 R/stat-identity.r
  47. +3 −0 R/stat-qq.r
  48. +3 −0 R/stat-quantile.r
  49. +3 −0 R/stat-smooth.r
  50. +3 −0 R/stat-spoke.r
  51. +3 −0 R/stat-sum.r
  52. +3 −0 R/stat-summary-2d.r
  53. +3 −0 R/stat-summary-hex.r
  54. +3 −0 R/stat-summary.r
  55. +3 −0 R/stat-unique.r
  56. +3 −0 R/stat-ydensity.r
  57. +20 −0 R/utilities-help.r
  58. +4 −0 man/geom_abline.Rd
  59. +4 −0 man/geom_bar.Rd
  60. +4 −0 man/geom_bin2d.Rd
  61. +4 −0 man/geom_boxplot.Rd
  62. +4 −0 man/geom_contour.Rd
  63. +4 −0 man/geom_crossbar.Rd
  64. +4 −0 man/geom_density.Rd
  65. +4 −0 man/geom_density2d.Rd
  66. +4 −0 man/geom_dotplot.Rd
  67. +4 −0 man/geom_errorbar.Rd
  68. +4 −0 man/geom_errorbarh.Rd
  69. +4 −0 man/geom_freqpoly.Rd
  70. +4 −0 man/geom_hex.Rd
  71. +4 −0 man/geom_histogram.Rd
  72. +4 −0 man/geom_hline.Rd
  73. +4 −0 man/geom_jitter.Rd
  74. +4 −0 man/geom_line.Rd
  75. +4 −0 man/geom_linerange.Rd
  76. +4 −0 man/geom_map.Rd
  77. +4 −0 man/geom_path.Rd
  78. +2 −8 man/geom_point.Rd
  79. +4 −0 man/geom_pointrange.Rd
  80. +4 −0 man/geom_polygon.Rd
  81. +4 −0 man/geom_quantile.Rd
  82. +4 −0 man/geom_raster.Rd
  83. +4 −0 man/geom_rect.Rd
  84. +4 −0 man/geom_ribbon.Rd
  85. +4 −0 man/geom_rug.Rd
  86. +4 −0 man/geom_segment.Rd
  87. +4 −0 man/geom_smooth.Rd
  88. +4 −0 man/geom_step.Rd
  89. +4 −0 man/geom_text.Rd
  90. +4 −0 man/geom_tile.Rd
  91. +4 −0 man/geom_violin.Rd
  92. +4 −0 man/geom_vline.Rd
  93. +4 −0 man/labs.Rd
  94. +4 −0 man/stat_bin.Rd
  95. +4 −0 man/stat_bin2d.Rd
  96. +4 −0 man/stat_bindot.Rd
  97. +4 −0 man/stat_binhex.Rd
  98. +4 −0 man/stat_boxplot.Rd
  99. +4 −0 man/stat_contour.Rd
  100. +4 −0 man/stat_density.Rd
  101. +4 −0 man/stat_density2d.Rd
  102. +4 −0 man/stat_function.Rd
  103. +4 −0 man/stat_identity.Rd
  104. +4 −0 man/stat_qq.Rd
  105. +4 −0 man/stat_quantile.Rd
  106. +4 −0 man/stat_smooth.Rd
  107. +4 −0 man/stat_spoke.Rd
  108. +4 −0 man/stat_sum.Rd
  109. +4 −0 man/stat_summary.Rd
  110. +4 −1 man/stat_summary2d.Rd
  111. +4 −1 man/stat_summary_hex.Rd
  112. +4 −0 man/stat_unique.Rd
  113. +4 −0 man/stat_ydensity.Rd
View
@@ -206,3 +206,4 @@ Collate:
'translate-qplot-gpl.r'
'translate-qplot-lattice.r'
'annotation-logticks.r'
+ 'utilities-help.r'
View
@@ -11,6 +11,9 @@
#' in all panels. If the intercept and slope are stored in the data, then
#' they can vary from panel to panel. See the examples for more ideas.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "abline")}
+#'
#' @seealso \code{\link{stat_smooth}} to add lines derived from the data,
#' \code{\link{geom_hline}} for horizontal lines,
#' \code{\link{geom_vline}} for vertical lines
View
@@ -29,6 +29,9 @@
#' \href{http://www.b-eye-network.com/view/index.php?cid=2468}{article on this topic}.
#' This is the reason it doesn't make sense to use a log-scaled y axis with a bar chart
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "bar")}
+#'
#' @seealso \code{\link{stat_bin}} for more details of the binning alogirithm,
#' \code{\link{position_dodge}} for creating side-by-side barcharts,
#' \code{\link{position_stack}} for more info on stacking,
View
@@ -8,6 +8,8 @@
#' but the idea is to get you experimenting with different binwidths. You
#' may need to look at a few to uncover the full story behind your data.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "histogram")}
#'
#' @export
#' @inheritParams geom_point
View
@@ -1,5 +1,8 @@
#' Add heatmap of 2d bin counts.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "bin2d")}
+#'
#' @export
#' @inheritParams geom_point
#' @examples
View
@@ -16,6 +16,9 @@
#' This gives a roughly 95% confidence interval for comparing medians.
#' See McGill et al. (1978) for more details.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "boxplot")}
+#'
#' @seealso \code{\link{stat_quantile}} to view quantiles conditioned on a
#' continuous variable, \code{\link{geom_jitter}} for another way to look
#' at conditional distributions"
View
@@ -1,5 +1,8 @@
#' Hollow bar with middle indicated by horizontal line.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "crossbar")}
+#'
#' @inheritParams geom_point
#' @param fatten a multiplicate factor to fatten middle bar by
#' @seealso \code{\link{geom_errorbar}} for error bars,
View
@@ -16,6 +16,9 @@
#' hide the y axis, as in one of the examples, or manually scale it
#' to match the number of dots.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "dotplot")}
+#'
#' @inheritParams geom_point
#' @param binaxis which axis to bin along "x" (default) or "y"
#' @param method "dotdensity" (default) for dot-density binning, or
View
@@ -1,5 +1,8 @@
#' Error bars.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "errorbar")}
+#'
#' @seealso \code{\link{geom_pointrange}}: range indicated by straight line,
#' with point in the middle; \code{\link{geom_linerange}}: range indicated
#' by straight line; \code{\link{geom_crossbar}}: hollow bar with middle
View
@@ -1,5 +1,8 @@
#' Horizontal error bars
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "errorbarh")}
+#'
#' @seealso \code{\link{geom_errorbar}}: vertical error bars
#' @inheritParams geom_point
#' @export
View
@@ -1,5 +1,8 @@
#' Frequency polygon.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "freqpoly")}
+#'
#' @seealso \code{\link{geom_histogram}}: histograms
#' @inheritParams geom_point
#' @export
View
@@ -1,5 +1,8 @@
#' Hexagon bining.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "hex")}
+#'
#' @export
#' @inheritParams geom_point
#' @examples
View
@@ -10,6 +10,9 @@
#' intercept for each panel using a data.frame. See the examples for the
#' differences
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "hline")}
+#'
#' @seealso \code{\link{geom_vline}} for vertical lines,
#' \code{\link{geom_abline}} for lines defined by a slope and intercept,
#' \code{\link{geom_segment}} for a more general approach
View
@@ -1,5 +1,8 @@
#' An interval represented by a vertical line.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "linerange")}
+#'
#' @seealso \code{\link{geom_errorbar}}: error bars;
#' \code{\link{geom_pointrange}}: range indicated by straight line, with
#' point in the middle; \code{\link{geom_crossbar}}: hollow bar with middle
View
@@ -5,6 +5,9 @@ NULL
#'
#' Does not affect position scales.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "map")}
+#'
#' @export
#' @param map Data frame that contains the map coordinates. This will
#' typically be created using \code{\link{fortify}} on a spatial object.
View
@@ -1,5 +1,8 @@
#' Connect observations in original order
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "path")}
+#'
#' @inheritParams geom_point
#' @param lineend Line end style (round, butt, square)
#' @param linejoin Line join style (round, mitre, bevel)
View
@@ -1,5 +1,8 @@
#' Display contours of a 3d surface in 2d.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "contour")}
+#'
#' @inheritParams geom_point
#' @inheritParams geom_path
#' @seealso \code{\link{geom_density2d}}: 2d density contours
View
@@ -5,6 +5,9 @@
#'
#' This can be useful for dealing with overplotting.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "density2d")}
+#'
#' @seealso \code{\link{geom_contour}} for contour drawing geom,
#' \code{\link{stat_sum}} for another way of dealing with overplotting
#' @inheritParams geom_point
View
@@ -1,5 +1,8 @@
#' Connect observations, ordered by x value.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "line")}
+#'
#' @seealso \code{\link{geom_path}}: connect observations in data order,
#' \code{\link{geom_segment}}: draw line segments,
#' \code{\link{geom_ribbon}}: fill between line and x-axis
View
@@ -1,5 +1,8 @@
#' Connect observations by stairs.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "step")}
+#'
#' @inheritParams geom_point
#' @param direction direction of stairs: 'vh' for vertical then horizontal, or
#' 'hv' for horizontal then vertical
View
@@ -23,19 +23,8 @@
#' way, using \code{\link{stat_sum}}. Another technique is to use transparent
#' points, \code{geom_point(alpha = 0.05)}.
#'
-#' @section Aesthetics:
-#'
-#' \code{geom_point} understands the following aesthetics:
-#'
-#' \itemize{
-#' \item \code{x}: horizontal position
-#' \item \code{y}: vertical position
-#' \item \code{shape}: point shape.
-#' \item \code{colour}: point colour.
-#' \item \code{fill}: fill colour, only affects solid points
-#' \item \code{size}: size.
-#' \item \code{alpha}: alpha transparency modifies colour.
-#' }
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "point")}
#'
#' @seealso \code{\link{scale_size}} to see scale area of points, instead of
#' radius, \code{\link{geom_jitter}} to jitter points to reduce (mild)
View
@@ -4,6 +4,9 @@
#' 'jitter'. See \code{\link{position_jitter}} to see how to adjust amount
#' of jittering.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "jitter")}
+#'
#' @inheritParams geom_point
#' @seealso
#' \code{\link{geom_point}} for regular, unjittered points,
View
@@ -1,5 +1,8 @@
#' An interval represented by a vertical line, with a point in the middle.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "pointrange")}
+#'
#' @inheritParams geom_point
#' @seealso
#' \code{\link{geom_errorbar}} for error bars,
View
@@ -1,5 +1,8 @@
#' Polygon, a filled path.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "polygon")}
+#'
#' @seealso
#' \code{\link{geom_path}} for an unfilled polygon,
#' \code{\link{geom_ribbon}} for a polygon anchored on the x-axis
View
@@ -2,6 +2,9 @@
#'
#' This can be used as a continuous analogue of a geom_boxplot.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "quantile")}
+#'
#' @export
#' @inheritParams geom_point
#' @inheritParams geom_path
View
@@ -12,6 +12,9 @@ NULL
#' If you want to manually set the padding (e.g. want zero-padding),
#' you can change the behavior by setting \code{hpad} and \code{vpad}.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "raster")}
+#'
#' @inheritParams geom_point
#' @param hjust,vjust horizontal and vertical justification of the grob. Each
#' justification value should be a number between 0 and 1. Defaults to 0.5
View
@@ -1,5 +1,8 @@
#' 2d rectangles.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "rect")}
+#'
#' @inheritParams geom_point
#' @export
#' @examples
View
@@ -1,5 +1,8 @@
#' Ribbons, y range with continuous x values.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "ribbon")}
+#'
#' @seealso
#' \code{\link{geom_bar}} for discrete intervals (bars),
#' \code{\link{geom_linerange}} for discrete intervals (lines),
View
@@ -2,6 +2,9 @@
#'
#' A smooth density estimate calculated by \code{\link{stat_density}}.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "density")}
+#'
#' @seealso \code{\link{geom_histogram}} for the histogram
#' @inheritParams geom_point
#' @export
View
@@ -1,5 +1,8 @@
#' Marginal rug plots.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "rug")}
+#'
#' @inheritParams geom_point
#' @param sides A string that controls which sides of the plot the rugs appear on.
#' It can be set to a string containing any of \code{"trbl"}, for top, right,
View
@@ -1,5 +1,8 @@
#' Single line segments.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "segment")}
+#'
#' @inheritParams geom_point
#' @param arrow specification for arrow heads, as created by arrow()
#' @seealso \code{\link{geom_path}} and \code{\link{geom_line}} for multi-
View
@@ -1,5 +1,8 @@
#' Add a smoothed conditional mean.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "smooth")}
+#'
#' @inheritParams geom_point
#' @seealso The default stat for this geom is \code{\link{stat_smooth}} see
#' that documentation for more options to control the underlying statistical transformation.
View
@@ -1,5 +1,8 @@
#' Textual annotations.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "text")}
+#'
#' @inheritParams geom_point
#' @param parse If TRUE, the labels will be parsed into expressions and
#' displayed as described in ?plotmath
View
@@ -2,6 +2,9 @@
#'
#' Similar to \code{\link{levelplot}} and \code{\link{image}}.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "tile")}
+#'
#' @inheritParams geom_point
#' @export
#' @examples
View
@@ -1,5 +1,8 @@
#' Violin plot.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "violin")}
+#'
#' @inheritParams geom_point
#' @param trim If \code{TRUE} (default), trim the tails of the violins
#' to the range of the data. If \code{FALSE}, don't trim the tails.
View
@@ -10,6 +10,9 @@
#' intercept for each panel using a data.frame. See the examples for the
#' differences.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "vline")}
+#'
#' @param show_guide should a legend be drawn? (defaults to \code{FALSE})
#' @inheritParams geom_point
#' @seealso
View
@@ -2,6 +2,9 @@
#'
#' Missing values are currently silently dropped.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("stat", "bin")}
+#'
#' @inheritParams stat_identity
#' @param binwidth Bin width to use. Defaults to 1/30 of the range of the
#' data
View
@@ -1,5 +1,8 @@
#' Count number of observation in rectangular bins.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("stat", "bin2d")}
+#'
#' @inheritParams stat_identity
#' @param bins numeric vector giving number of bins in both vertical and
#' horizontal directions. Set to 30 by default.
View
@@ -3,6 +3,9 @@
#' Missing values are currently silently dropped.
#' If weights are used, they must be integer values.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("stat", "bindot")}
+#'
#' @inheritParams stat_identity
#' @param binaxis The axis to bin along, "x" (default) or "y"
#' @param method "dotdensity" (default) for dot-density binning, or
View
@@ -1,5 +1,8 @@
#' Bin 2d plane into hexagons.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("stat", "binhex")}
+#'
#' @seealso \code{\link{stat_bin2d}} for rectangular binning
#' @param bins numeric vector specifying number of bins in both x and y
#' directions. Set to 30 by default.
View
@@ -1,5 +1,8 @@
#' Calculate components of box and whisker plot.
#'
+#' @section Aesthetics:
+#' \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("stat", "boxplot")}
+#'
#' @param coef length of the whiskers as multiple of IQR. Defaults to 1.5
#' @param na.rm If \code{FALSE} (the default), removes missing values with
#' a warning. If \code{TRUE} silently removes missing values.
Oops, something went wrong.

0 comments on commit d7971cb

Please sign in to comment.