Skip to content
This repository
Browse code

cleaning up documentation

  • Loading branch information...
commit a453bb03e1da98883cfe92630731cba282f8b6d2 1 parent 3160a29
Jeffrey Arnold authored

Showing 49 changed files with 289 additions and 353 deletions. Show diff stats Hide diff stats

  1. +2 2 R/banking.R
  2. +6 4 R/colorblind.R
  3. +14 13 R/economist.R
  4. +11 7 R/excel.R
  5. +16 20 R/few.R
  6. +2 9 R/geom-rangeframe.R
  7. +1 3 R/geom-tufteboxplot.R
  8. +3 49 R/ggthemes-data.R
  9. +1 1  R/ggthemes-package.R
  10. +12 6 R/igray.R
  11. +14 10 R/shapes.R
  12. +19 10 R/solarized.R
  13. +14 15 R/stata.R
  14. +7 11 R/tableau.R
  15. +2 1  R/tufte.R
  16. +6 3 R/wsj.R
  17. +2 2 man/bank_slopes.Rd
  18. +21 21 man/cleveland_shape_pal.Rd
  19. +4 4 man/colorblind.Rd
  20. +3 3 man/economist_pal.Rd
  21. +7 1 man/excel_pal.Rd
  22. +1 1  man/few_pal.Rd
  23. +4 7 man/geom_rangeframe.Rd
  24. +1 3 man/geom_tufteboxplot.Rd
  25. +1 1  man/ggthemes.Rd
  26. +12 44 man/ggthemes_data.Rd
  27. +1 2  man/scale_color_tableau.Rd
  28. +0 2  man/scale_economist.Rd
  29. +4 5 man/scale_excel.Rd
  30. +2 17 man/scale_few.Rd
  31. +1 1  man/scale_linetype_stata.Rd
  32. +1 2  man/scale_shape_stata.Rd
  33. +1 2  man/scale_shape_tableau.Rd
  34. +3 7 man/scale_solarized.Rd
  35. +3 3 man/scale_stata.Rd
  36. +11 6 man/solarized_pal.Rd
  37. +2 2 man/solarized_rebase.Rd
  38. +5 4 man/stata_pal.Rd
  39. +1 1  man/stata_shape_pal.Rd
  40. +3 3 man/tableau_color_pal.Rd
  41. +2 2 man/tableau_shape_pal.Rd
  42. +16 9 man/theme_economist.Rd
  43. +7 8 man/theme_excel.Rd
  44. +13 3 man/theme_few.Rd
  45. +1 2  man/theme_foundation.Rd
  46. +14 9 man/theme_igray.Rd
  47. +4 6 man/theme_stata.Rd
  48. +2 2 man/theme_tufte.Rd
  49. +6 4 man/theme_wsj.Rd
4 R/banking.R
@@ -68,7 +68,7 @@ calc_slopes <- function(x, y, cull=FALSE) {
68 68 ##' This method finds the aspect ratio by setting the average
69 69 ##' orientation to 45 degrees. For an aspect ratio
70 70 ##' \eqn{\alpha}{alpha}, let the orientation of a line segment be
71   -##' \eqn{\theta_i(\alpha) = \atan(s_i / \alpha)}{theta_i(alpha) = atan(s_i / alpha)}.
  71 +##' \eqn{\theta_i(\alpha) = \arctan(s_i / \alpha)}{theta_i(alpha) = atan(s_i / alpha)}.
72 72 ##'
73 73 ##' \deqn{
74 74 ##' \frac{ \sum_i \theta_i(\alpha) l_i}{\sum_i l_i} = \frac{\pi}{4} rad
@@ -104,7 +104,7 @@ calc_slopes <- function(x, y, cull=FALSE) {
104 104 ##' The angle between line segments i and j is \eqn{r_{i,j} =
105 105 ##' \|\theta_i(\alpha) - \theta_j(\alpha)\|}{r_{i,j} = |
106 106 ##' theta_i(alpha) - theta_j(alpha)|}, where \eqn{\theta_i(\alpha) =
107   -##' \atan(s_i / \alpha)}{theta_i(alpha) = atan(s_i / \alpha)} and
  107 +##' \arctan(s_i / \alpha)}{theta_i(alpha) = atan(s_i / \alpha)} and
108 108 ##' \eqn{s_i} is the slope of line segment i. This function finds the
109 109 ##' \eqn{\alpha} that maximizes the sum of the angles between all
110 110 ##' pairs of line segments.
10 R/colorblind.R
... ... @@ -1,12 +1,14 @@
1 1 ##' Colorblind Color Palette (Discrete) and Scales
2 2 ##'
3   -##' 8-Color Colorblind palette from
4   -##' \url{http://jfly.iam.u-tokyo.ac.jp/color} and the \href{http://wiki.stdout.org/rcookbook/Graphs/Colors\%20(ggplot2)}{R Cookbook}/
  3 +##' An 8-color colorblind safe qualitative discrete palette from
  4 +##' \url{http://jfly.iam.u-tokyo.ac.jp/color} and the
  5 +##' \href{http://wiki.stdout.org/rcookbook/Graphs/Colors%20(ggplot2)/#a-colorblind-friendly-palette}{Cookbook
  6 +##' for R}.
5 7 ##'
6   -##' @rdname colorblind
  8 +##' @rdname colorblind
7 9 ##' @export
8 10 ##' @inheritParams ggplot2::scale_colour_hue
9   -##' @family scales palettes
  11 +##' @family colour
10 12 ##' @seealso The \pkg{dichromat} package, \code{\link[scales]{dichromat_pal}}, and \code{\link{scale_color_tableau}} for other
11 13 ##' colorblind palettes.
12 14 ##' @examples
27 R/economist.R
... ... @@ -1,10 +1,9 @@
1 1 ##' Economist color palette (discrete)
2 2 ##'
3   -##' The primary colors are blues, grays, and greens. Red is not
4   -##' included (early) in these palettes and should be used to indicate
  3 +##' The hues in the palette are blues, grays, and greens. Red is not
  4 +##' included in these palettes and should be used to indicate
5 5 ##' important data.
6 6 ##'
7   -##'
8 7 ##' @param stata Use the palette in the Stata economist scheme.
9 8 ##' @param fill Use the fill palette.
10 9 ##' @family colour economist
@@ -75,8 +74,7 @@ economist_pal <- function(stata=FALSE, fill=TRUE) {
75 74
76 75 ##' Economist color scales
77 76 ##'
78   -##' Color scales using the colors in the Economist graphics. These scales use
79   -##' RGB values and ordering of the colors in the Stata economist scheme.
  77 +##' Color scales using the colors in the Economist graphics.
80 78 ##'
81 79 ##' @inheritParams ggplot2::scale_colour_hue
82 80 ##' @inheritParams economist_pal
@@ -98,7 +96,6 @@ scale_fill_economist <- function(stata=FALSE, ...) {
98 96 discrete_scale("fill", "economist", economist_pal(stata=stata), ...)
99 97 }
100 98
101   -
102 99 ##' ggplot color theme based on the Economist
103 100 ##'
104 101 ##' Style plots similar to those in \emph{The Economist}.
@@ -108,25 +105,29 @@ scale_fill_economist <- function(stata=FALSE, ...) {
108 105 ##' \href{http://economist.com}{economist.com}.
109 106 ##' \code{theme_economist_white} implements a variant with a while
110 107 ##' panel and light gray (or white) background used by \emph{The Economist}
111   -##' blog "Graphic Detail".
  108 +##' blog \href{http://www.economist.com/blogs/graphicdetail}{Graphic Detail}.
112 109 ##'
113   -##' The Economist uses "ITC Officina Sans" as its font for graphs. If
  110 +##' \emph{The Economist} uses "ITC Officina Sans" as its font for graphs. If
114 111 ##' you have access to this font, you can use it with the
115   -##' \bold{extrafont} package. "Verdana" is a good substitute.
  112 +##' \pkg{extrafont} package. "Verdana" is a good substitute.
116 113 ##'
117   -##' @param base_size base font size
118   -##' @param base_family base font family
  114 +##' @param base_size \code{numeric} base font size
  115 +##' @param base_family \code{character} base font family
119 116 ##' @param horizontal \code{logical}. Horizontal axis lines?
120 117 ##' @param dkpanel \code{logical} Darker background for panel region?
121 118 ##' @param stata \code{logical} Use RGB values from Stata's
122   -##' ##' economist scheme.
123   -##' @param gray_bg For the white
  119 +##' economist scheme.
  120 +##' @param gray_bg \code{logical} If \code{TRUE}, use gray background, else use white
  121 +##' background.
  122 +##'
  123 +##' @return An object of class \code{\link{theme}}.
124 124 ##'
125 125 ##' @export
126 126 ##' @family themes economist
127 127 ##'
128 128 ##' @references
129 129 ##' \itemize{
  130 +##' \item \href{http://economist.com}{The Economist}
130 131 ##' \item \href{http://spiekermann.com/en/itc-officina-display/}{Spiekerblog, "ITC Officina Display", January 1, 2007.}
131 132 ##' \item \url{http://www.economist.com/help/about-us}
132 133 ##' }
18 R/excel.R
@@ -10,7 +10,8 @@
10 10 ##' \item{new}{Color palette from newer Excel versions.}
11 11 ##' }
12 12 ##'
13   -##' @param palette One of "old", "fill", or "new".
  13 +##' @param palette One of \code{"old"}, \code{"fill"}, or \code{"new"}.
  14 +##' @family colour excel
14 15 ##' @export
15 16 ##' @examples
16 17 ##' library(scales)
@@ -29,9 +30,11 @@ excel_pal <- function(palette="line") {
29 30
30 31 ##' Excel color scales
31 32 ##'
  33 +##' Color scales from both old and new Excel.
  34 +##'
32 35 ##' @inheritParams excel_pal
33 36 ##' @inheritParams ggplot2::scale_colour_hue
34   -##' @family colour scales
  37 +##' @family colour excel
35 38 ##' @rdname scale_excel
36 39 ##' @export
37 40 ##' @seealso See \code{\link{theme_excel}} for examples.
@@ -56,14 +59,15 @@ scale_color_excel <- scale_colour_excel
56 59
57 60 ##' ggplot color theme based on old Excel plots
58 61 ##'
59   -##' Theme to replicate the ugly monstrosity that was the Excel 2003
60   -##' chart. Please never use this.
  62 +##' Theme to replicate the ugly monstrosity that was the old
  63 +##' gray-background Excel chart. Please never use this.
61 64 ##'
62   -##' @param base_size base font size
63   -##' @param base_family base font family
  65 +##' @param base_size \code{numeric} base font size
  66 +##' @param base_family \code{character} base font family
64 67 ##' @param horizontal \code{logical}. Horizontal axis lines?
  68 +##' @return An object of class \code{\link{theme}}.
65 69 ##' @export
66   -##' @family themes
  70 +##' @family themes excel
67 71 ##' @examples
68 72 ##' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
69 73 ##' # Old line color palette
36 R/few.R
... ... @@ -1,4 +1,4 @@
1   -##' Palletes from Stephen Few (discrete)
  1 +##' Color Palletes from Few "Practical Rules for Using Color in Charts"
2 2 ##'
3 3 ##' Qualitative color palettes from Stephen Few,
4 4 ##' \href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical
@@ -25,29 +25,15 @@ few_pal <- function(palette="medium") {
25 25 manual_pal(unname(values[2:n]))
26 26 }
27 27
28   -##' Few "Practical Rules for Using Color in Charts" color scales
  28 +##' Color scales from Few "Practical Rules for Using Color in Charts"
29 29 ##'
30   -##' Qualitative color scales from Stephen Few,
31   -##' \href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical
32   -##' Rules for Using Color in Charts"}.
  30 +##' See \code{\link{few_pal}}.
33 31 ##'
34 32 ##' @inheritParams ggplot2::scale_colour_hue
35 33 ##' @inheritParams few_pal
36 34 ##' @family colour few
37 35 ##' @rdname scale_few
38 36 ##' @export
39   -##' @examples
40   -##' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
41   -##' (qplot(carat, price, data=dsamp, colour=clarity)
42   -##' + theme_few()
43   -##' + scale_colour_few())
44   -##' (qplot(carat, price, data=dsamp, colour=clarity)
45   -##' + theme_few()
46   -##' + scale_colour_few("dark"))
47   -##' (ggplot(diamonds, aes(clarity, fill=cut))
48   -##' + geom_bar()
49   -##' + theme_few()
50   -##' + scale_fill_few("light"))
51 37 scale_colour_few <- function(palette="medium", ...) {
52 38 discrete_scale("colour", "few", few_pal(palette), ...)
53 39 }
@@ -62,7 +48,7 @@ scale_fill_few <- function(palette="light", ...) {
62 48 discrete_scale("fill", "few", few_pal(palette), ...)
63 49 }
64 50
65   -##' Theme based on Stephen Few's "Practical Rules for Using Color in Charts"
  51 +##' Theme based on Few's "Practical Rules for Using Color in Charts"
66 52 ##'
67 53 ##' Theme based on the rules and examples in
68 54 ##' \href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical
@@ -71,8 +57,18 @@ scale_fill_few <- function(palette="light", ...) {
71 57 ##' @inheritParams ggplot2::theme_bw
72 58 ##' @family themes few
73 59 ##' @export
74   -##'
75   -##' @seealso \code{\link{scale_colour_few}} for exaples.
  60 +##' @examples
  61 +##' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
  62 +##' (qplot(carat, price, data=dsamp, colour=clarity)
  63 +##' + theme_few()
  64 +##' + scale_colour_few())
  65 +##' (qplot(carat, price, data=dsamp, colour=clarity)
  66 +##' + theme_few()
  67 +##' + scale_colour_few("dark"))
  68 +##' (ggplot(diamonds, aes(clarity, fill=cut))
  69 +##' + geom_bar()
  70 +##' + theme_few()
  71 +##' + scale_fill_few("light"))
76 72 theme_few <- function(base_size=12, base_family="") {
77 73 colors <- ggthemes_data$few
78 74 gray <- colors$medium['gray']
11 R/geom-rangeframe.R
... ... @@ -1,16 +1,9 @@
1 1 ##' Range Frames
2 2 ##'
3   -##' Axis lines which show the maximum and minimum of the data plotted.
  3 +##' Axis lines which extend to the maximum and minimum of the plotted data.
4 4 ##'
5 5 ##' @section Aesthetics:
6   -##' \code{geom_RangeFrame} understands the following aesthetics (required aesthetics are in bold):
7   -##'
8   -##' \itemize{
9   -##' \item \code{alpha}
10   -##' \item \code{colour}
11   -##' \item \code{linetype}
12   -##' \item \code{size}
13   -##' }
  6 +##' \Sexpr[results=rd,stage=build]{ggthemes:::rd_aesthetics("geom_tufteboxplot", ggthemes:::GeomRangeFrame)}
14 7 ##'
15 8 ##' @inheritParams ggplot2::geom_point
16 9 ##' @param sides A string that controls which sides of the plot the frames appear on.
4 R/geom-tufteboxplot.R
... ... @@ -1,9 +1,7 @@
1 1 ##' Tufte's Box Blot
2 2 ##'
3 3 ##' Edward Tufte's revision of the box plot erases the box and
4   -##' replaces it with a single middle point. What is usually
5   -##' represented by notches in a standard box plot is represented by a
6   -##' box with a line for the median.
  4 +##' replaces it with a single point and the whiskers.
7 5 ##'
8 6 ##' @section Aesthetics:
9 7 ##' \Sexpr[results=rd,stage=build]{ggthemes:::rd_aesthetics("geom_tufteboxplot", ggthemes:::GeomTufteboxplot)}
52 R/ggthemes-data.R
... ... @@ -1,52 +1,6 @@
1 1 ##' Palette data for ggthemes package
2 2 ##'
3   -##' List with the data used by palettes in the ggthemes package.
4   -##'
5   -##' @docType data
6   -##' @format A \code{list}.
7   -##' \describe{
8   -##' \item{economist}{
9   -##' Colors from The Economist magazine. RGB values taken from
10   -##' the economist scheme in Stata. \code{bg} are background
11   -##' colors, \code{fg} are foreground colors.
12   -##' }
13   -##' \item{excel}{
14   -##' \code{list} Various Excel color palettes.
15   -##' \code{line} The Excel 2003 line color palette.
16   -##' \code{fill} The Excel 2003 bar chart color palette.
17   -##' \code{new} Color palette from more recent versions of Excel.
18   -##' Color RGB values from \url{http://vis.stanford.edu/color-names/analyzer/}.
19   -##' }
20   -##' \item{solarized}{
21   -##' Names and RGB values of the Solarized palette.
22   -##' \url{http://ethanschoonover.com/solarized}.
23   -##' \code{base} Base colors.
24   -##' \code{accent} Accent colors.
25   -##' }
26   -##' \item{stata}{
27   -##' Colors, shapes, and linetypes used by Stata
28   -##' \code{colors} RBG values of of all Stata colors.
29   -##' \code{shapes} R shape values of of all Stata symbol types.
30   -##' \code{linetype} Equivalent R linepattern for all Stata linepattern sytles. \url{http://www.stata.com/help.cgi?symbolstyle}.
31   -##' }
32   -##' \item{few}{
33   -##' Qualitative color palettes from Stephen Few,
34   -##' \href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical Rules for Using Color in Charts"}.
35   -##' He suggests using \code{medium}, except for thin lines and small points, for which use \code{dark}.
36   -##' }
37   -##' \item{tableau}{Color and shapes used by Tableau}
38   -##' \item{manyeyes}{
39   -##' Color palette from \href{http://www-958.ibm.com/software/data/cognos/manyeyes/}{IBM Many Eyes};
40   -##' values from \url{http://vis.stanford.edu/color-names/analyzer/}.
41   -##' }
42   -##' \item{wsj}{
43   -##' Colors used in \code{\link{theme_wsj}} and \code{\link{scale_colour_wsj}}.
44   -##' }
45   -##' \item{colorblind}{
46   -##' Colorblind palette from \url{http://jfly.iam.u-tokyo.ac.jp/color/}
47   -##' }
48   -##' }
49   -##'
  3 +##' List with the data used by the palettes in the ggthemes package.
50 4 ##'
51 5 ##' @export
52 6 ggthemes_data <- {
@@ -543,7 +497,7 @@ ggthemes_data <- {
543 497 orange = "#fb832d",
544 498 black = "#000000")
545 499
546   - ##
  500 + ##
547 501 x$colorblind <- c(black="#000000",
548 502 orange="#E69F00",
549 503 sky_blue="#56B4E9",
@@ -552,7 +506,7 @@ ggthemes_data <- {
552 506 blue="#0072B2",
553 507 vermillion="#D55E00",
554 508 reddish_purple="#CC79A7")
555   -
  509 +
556 510 ## Return
557 511 x
558 512 }
2  R/ggthemes-package.R
... ... @@ -1,7 +1,7 @@
1 1 ##' ggthemes
2 2 ##'
3 3 ##' This package contains extra themes, scales, and geoms, and
4   -##' functions for and related to \bold{ggplot2}.
  4 +##' functions for and related to \pkg{ggplot2}.
5 5 ##'
6 6 ##' In addtion to the help pages, see the REAMDE page on
7 7 ##' \href{https://github.com/jrnold/ggthemes}{github} for examples.
18 R/igray.R
... ... @@ -1,16 +1,22 @@
1 1 ##' Inverse gray theme
2 2 ##'
3   -##' Inverts the colors in the \code{\link{theme_gray}}, a white panel
4   -##' and a light gray area around it. This keeps a white background,
5   -##' but with more gray, it keeps the plot closer to the typographical
6   -##' color of the document, which was the motivation for using a gray
7   -##' background in \code{theme_gray}. This is also the style of plots
8   -##' in Stata and Tableau.
  3 +##' Theme with white panel and gray background.
  4 +##'
  5 +##' @section Details:
  6 +##'
  7 +##' This theme inverts the colors in the \code{\link{theme_gray}}, a
  8 +##' white panel and a light gray area around it. This keeps a white
  9 +##' background for the color scales like \code{\link{theme_bw}}. But
  10 +##' by using a gray background, the plot is closer to the
  11 +##' typographical color of the document, which is the motivation for
  12 +##' using a gray panel in \code{\link{theme_gray}}. This is
  13 +##' similar to the style of plots in Stata and Tableau.
9 14 ##'
10 15 ##' @param base_size base font size
11 16 ##' @param base_family base font family
12 17 ##' @export
13 18 ##' @family themes
  19 +##' @seealso \code{\link{theme_gray}}, \code{\link{theme_bw}}
14 20 ##' @examples
15 21 ##' dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
16 22 ##' (d <- qplot(carat, price, data=dsamp, colour=clarity)
24 R/shapes.R
... ... @@ -1,12 +1,16 @@
1 1 ##' Shape palette from Cleveland "Elements of Graphing Data" (discrete).
2 2 ##'
  3 +##' Shape palettes for overlapping and non-overlapping points.
  4 +##'
3 5 ##' @param overlap \code{logical} Use the scale for overlapping points?
4 6 ##'
5   -##' @note In the Elements of Graphing Data, Cleveland suggests two
6   -##' shapes palettes for scatter plots: one for overlapping data and
7   -##' one for non-overlapping data. The pattern for overlapping data
  7 +##' @note
  8 +##'
  9 +##' In the \emph{Elements of Graphing Data}, W.S. Cleveland suggests
  10 +##' two shape palettes for scatter plots: one for overlapping data and
  11 +##' another for non-overlapping data. The symbols for overlapping data
8 12 ##' relies on pattern discrimination, while the symbols for
9   -##' non-overlapping data varies the amount of fill. This palatte
  13 +##' non-overlapping data vary the amount of fill. This palatte
10 14 ##' attempts to create these palettes. However, I found that these
11 15 ##' were hard to replicate. Using the R shapes and unicode fonts: the
12 16 ##' symbols can vary in size, they are dependent of the fonts used,
@@ -14,11 +18,11 @@
14 18 ##' vertical line. If someone can improve this palette, please let me
15 19 ##' know.
16 20 ##'
17   -##' Following Tremmel (1995), I replace the cirlce with a vertical line
18   -##' with an encircled plus sign.
  21 +##' Following Tremmel (1995), I replace the circle with a vertical
  22 +##' line with an encircled plus sign.
19 23 ##'
20 24 ##' @examples
21   -##' # xoverlapping symbol palette
  25 +##' # overlapping symbol palette
22 26 ##' dsamp <- diamonds[sample(nrow(diamonds), 100), ]
23 27 ##' (qplot(carat, price, data=dsamp, shape=cut)
24 28 ##' + theme_bw() + scale_shape_cleveland())
@@ -27,9 +31,9 @@
27 31 ##' + theme_bw() + scale_shape_cleveland(overlap=FALSE))
28 32 ##'
29 33 ##' @references
30   -##' Cleveland WS. The Elements of Graphing Data. Revised Edition. Hobart Press, Summit, NJ, 1994, pp. 154-164, 234-239.
31   -##' @references Tremmel, Lothar, (1995) "The Visual Separability of Plotting Symbols in Scatterplots"
32   -##' Journal of Computational and Graphical Statistics,
  34 +##' Cleveland WS. \emph{The Elements of Graphing Data}. Revised Edition. Hobart Press, Summit, NJ, 1994, pp. 154-164, 234-239.
  35 +##'
  36 +##' Tremmel, Lothar, (1995) "The Visual Separability of Plotting Symbols in Scatterplots", \emph{Journal of Computational and Graphical Statistics},
33 37 ##' \url{http://www.jstor.org/stable/1390760}
34 38 ##'
35 39 ##' @family shapes
29 R/solarized.R
@@ -3,8 +3,10 @@
3 3 ##' @param light \code{logical} Light theme?
4 4 ##'
5 5 ##' Creates the base colors for a light or dark solarized theme. See
6   -##' \url{http://ethanschoonover.com/solarized}. The idea for this
7   -##' function comes from the CSS style example.
  6 +##' \url{http://ethanschoonover.com/solarized}. This function is a port
  7 +##' of the CSS style example.
  8 +##'
  9 +##' @keywords internal
8 10 solarized_rebase <- function(light=TRUE) {
9 11 if (light) {
10 12 rebase <- ggthemes_data$solarized$base[c(paste('base', 3:0, sep=''),
@@ -17,15 +19,24 @@ solarized_rebase <- function(light=TRUE) {
17 19 rebase
18 20 }
19 21
  22 +solarized_accent_list <- function() {
  23 + paste0("\\code{\"", names(ggthemes_data$solarized$accents), "\"}",
  24 + collapse=",")
  25 +}
  26 +
20 27 ##' Solarized color palette (discrete)
21 28 ##'
22   -##' Solarized accents palette from
23   -##' \url{http://ethanschoonover.com/solarized}. The colors chosen are
24   -##' the combination of colors that maximize the total Euclidean
25   -##' distance between colors in L*a*b space, given a primary accent.
  29 +##' Qualitative color palate based on the Ethan Schoonover's Solarized
  30 +##' palette, \url{http://ethanschoonover.com/solarized}.
  31 +##'
  32 +##' @note
26 33 ##'
  34 +##' For a given starting color and number of colors in the palette,
  35 +##' the other colors are the combination of colors that maximizes the
  36 +##' total Euclidean distance between colors in L*a*b space.
27 37 ##'
28   -##' @param accent \code{character} Primary accent color.
  38 +##' @param accent \code{character} Starting color. One of
  39 +##' \Sexpr[results=rd,stage=build]{ggthemes:::solarized_accent_list()}
29 40 ##' @export
30 41 ##' @family solarized colour
31 42 ##' @examples
@@ -63,9 +74,7 @@ solarized_pal <- function(accent="blue") {
63 74
64 75 ##' Solarized color scales
65 76 ##'
66   -##' Accent color theme for Solarized.
67   -##' Primarily for use with
68   -##' \code{\link{theme_solarized}}.
  77 +##' See \code{\link{solarized_pal}} for details.
69 78 ##'
70 79 ##' @inheritParams ggplot2::scale_colour_hue
71 80 ##' @inheritParams solarized_pal
29 R/stata.R
... ... @@ -1,8 +1,11 @@
1 1 ##' Stata color palettes (discrete)
2 2 ##'
3   -##' Stata color palettes. See Stata documentation for schemes: \url{http://www.stata.com/help.cgi?schemes}
  3 +##' Stata color palettes. See Stata documentation for a description of
  4 +##' the schemes, \url{http://www.stata.com/help.cgi?schemes}.
  5 +##'
  6 +##' @param scheme \code{character}. One of \code{"s2color"},
  7 +##' \code{"s1rcolor"}, \code{"s1color"}, or \code{"mono"}.
4 8 ##'
5   -##' @param scheme \code{character}. One of "s2color", "s1rcolor", "s1color", or "mono".
6 9 ##' @export
7 10 ##' @family stata colour
8 11 ##' @examples
@@ -32,7 +35,7 @@ stata_pal <- function(scheme="s2color") {
32 35
33 36 ##' Stata color scales
34 37 ##'
35   -##' Color scales using the color palettes from Stata.
  38 +##' See \code{\link{stata_pal}} for details.
36 39 ##'
37 40 ##' @inheritParams stata_pal
38 41 ##' @inheritParams ggplot2::scale_colour_hue
@@ -188,9 +191,7 @@ theme_stata_colors <- function(scheme="s2color") {
188 191 plot.background = element_rect(fill = color_plot))
189 192 }
190 193
191   -##' ggplot theme based on Stata graph schemes
192   -##'
193   -##' Themes which replicate Stata graph schemes.
  194 +##' Themes based on Stata graph schemes
194 195 ##'
195 196 ##' @param scheme One of "s2color", "s2mono", "s1color", "s1rcolor", or "s1mono", "s2manual",
196 197 ##' "s1manual", or "sj"
@@ -199,10 +200,9 @@ theme_stata_colors <- function(scheme="s2color") {
199 200 ##' @export
200 201 ##' @family themes stata
201 202 ##'
202   -##' @note Stata graph schemes include what ggplot seperates into
203   -##' themes and scales, as well as defaults specific to different graph
204   -##' types (which ggplot does not support). These themes should be used
205   -##' in conjunction with \code{\link{scale_colour_stata}}, see the examples.
  203 +##' @note Stata graph schemes include what \pkg{ggplot2} seperates
  204 +##' into themes and scales, as well as defaults specific to different
  205 +##' graph types (which ggplot does not support).
206 206 ##'
207 207 ##' @references \url{http://www.stata.com/help.cgi?schemes}
208 208 ##'
@@ -244,8 +244,8 @@ theme_stata <- function(scheme="s2color", base_size = 11, base_family = "sans")
244 244
245 245 ##' Stata shape palette (discrete)
246 246 ##'
247   -##' Shape palette based on the symbol palette in Stata,
248   -##' specifically the scheme s2mono.
  247 +##' Shape palette based on the symbol palette in Stata, specifically
  248 +##' that for the scheme s2mono.
249 249 ##'
250 250 ##' @export
251 251 ##' @family shapes stata
@@ -262,8 +262,7 @@ stata_shape_pal <- function() {
262 262
263 263 ##' Stata shape scale
264 264 ##'
265   -##' Shape scale palette based on the symbol palette in Stata,
266   -##' specifically the one in scheme s1mono.
  265 +##' See \code{\link{stata_shape_pal}} for details.
267 266 ##'
268 267 ##' @inheritParams ggplot2::scale_x_discrete
269 268 ##' @family shape stata
@@ -291,7 +290,7 @@ stata_linetype_pal <- function() {
291 290
292 291 ##' Stata linetype palette (discrete)
293 292 ##'
294   -##' Linetype scale based on the linepatterns used in Stata.
  293 +##' See \code{\link{stata_linetype_pal}} for details.
295 294 ##'
296 295 ##' @inheritParams ggplot2::scale_x_discrete
297 296 ##' @family linetype stata
18 R/tableau.R
... ... @@ -1,7 +1,7 @@
1   -##' Tableau Color Palettes (discrete)
  1 +##' Color Palettes based on Tableau (discrete)
2 2 ##'
3   -##' Color palettes used by
4   -##' \href{http://www.tableausoftware.com/}{Trableau}.
  3 +##' Color palettes used in
  4 +##' \href{http://www.tableausoftware.com/}{Tableau}.
5 5 ##'
6 6 ##' @export
7 7 ##' @param palette Palette name
@@ -58,8 +58,7 @@ tableau_color_pal <- function(palette = "tableau10") {
58 58
59 59 ##' Tableau color scales.
60 60 ##'
61   -##' Color scales used by
62   -##' \href{http://www.tableausoftware.com/}{Trableau}.
  61 +##' See \code{\link{tableau_color_pal}} for details.
63 62 ##'
64 63 ##' @inheritParams ggplot2::scale_colour_hue
65 64 ##' @inheritParams tableau_color_pal
@@ -94,10 +93,10 @@ scale_fill_tableau <- function (palette = "tableau10", ...) {
94 93 #' @rdname scale_color_tableau
95 94 scale_color_tableau <- scale_colour_tableau
96 95
97   -##' Tabaleau Shape Palettes (discrete)
  96 +##' Tableau Shape Palettes (discrete)
98 97 ##'
99 98 ##' Shape palettes used by
100   -##' \href{http://www.tableausoftware.com/}{Trableau}.
  99 +##' \href{http://www.tableausoftware.com/}{Tableau}.
101 100 ##'
102 101 ##' @export
103 102 ##' @param palette Palette name
@@ -110,8 +109,7 @@ tableau_shape_pal <- function(palette="default") {
110 109
111 110 ##' Tableau shape scales
112 111 ##'
113   -##' Shape scales used by
114   -##' \href{http://www.tableausoftware.com/}{Trableau}.
  112 +##' See \code{\link{tableau_shape_pal}} for details.
115 113 ##'
116 114 ##' @export
117 115 ##' @inheritParams tableau_shape_pal
@@ -124,5 +122,3 @@ tableau_shape_pal <- function(palette="default") {
124 122 scale_shape_tableau <- function (palette = "default", ...) {
125 123 discrete_scale("shape", "tableau", tableau_shape_pal(palette), ...)
126 124 }
127   -
128   -
3  R/tufte.R
... ... @@ -1,4 +1,4 @@
1   -##' Tufte Data-Ink Maximized Theme
  1 +##' Tufte Maximal Data, Minimal Ink Theme
2 2 ##'
3 3 ##' Theme based on Chapter 6 "Data-Ink Maximization and Graphical
4 4 ##' Design" of Edward Tufte *The Visual Display of Quantitative
@@ -6,6 +6,7 @@
6 6 ##' best in combination with \code{\link{geom_rug}} or
7 7 ##' \code{\link{geom_rangeframe}}.
8 8 ##'
  9 +##' @note
9 10 ##' The default font family is set to "serif" as he uses serif fonts
10 11 ##' for labels in "The Visual Display of Quantitative Information".
11 12 ##' The serif font used by Tufte in his books is a variant of Bembo,
9 R/wsj.R
... ... @@ -1,9 +1,12 @@
1 1 ##' Wall Street Journal theme
2 2 ##'
3 3 ##' Theme based on the plots in \emph{The Wall Street Journal}.
4   -##' Collections of these plots can be found on the WSJ Graphics
5   -##' \href{https://twitter.com/WSJGraphics}{Twitter} feed and
6   -##' \href{http://pinterest.com/wsjgraphics/wsj-graphics/}{Pinterest}.
  4 +##'
  5 +##' @references
  6 +##'
  7 +##' \url{https://twitter.com/WSJGraphics}
  8 +##'
  9 +##' \url{http://pinterest.com/wsjgraphics/wsj-graphics/}
7 10 ##'
8 11 ##' @param base_size Base font size.
9 12 ##' @param color The background color of plot. One of \code{"brown",
4 man/bank_slopes.Rd
@@ -61,7 +61,7 @@
61 61 This method finds the aspect ratio by setting the average
62 62 orientation to 45 degrees. For an aspect ratio
63 63 \eqn{\alpha}{alpha}, let the orientation of a line
64   - segment be \eqn{\theta_i(\alpha) = \atan(s_i /
  64 + segment be \eqn{\theta_i(\alpha) = \arctan(s_i /
65 65 \alpha)}{theta_i(alpha) = atan(s_i / alpha)}.
66 66
67 67 \deqn{ \frac{ \sum_i \theta_i(\alpha) l_i}{\sum_i l_i} =
@@ -89,7 +89,7 @@
89 89 The angle between line segments i and j is \eqn{r_{i,j} =
90 90 \|\theta_i(\alpha) - \theta_j(\alpha)\|}{r_{i,j} = |
91 91 theta_i(alpha) - theta_j(alpha)|}, where
92   - \eqn{\theta_i(\alpha) = \atan(s_i /
  92 + \eqn{\theta_i(\alpha) = \arctan(s_i /
93 93 \alpha)}{theta_i(alpha) = atan(s_i / \alpha)} and
94 94 \eqn{s_i} is the slope of line segment i. This function
95 95 finds the \eqn{\alpha} that maximizes the sum of the
42 man/cleveland_shape_pal.Rd
@@ -9,28 +9,28 @@
9 9 overlapping points?}
10 10 }
11 11 \description{
12   - Shape palette from Cleveland "Elements of Graphing Data"
13   - (discrete).
  12 + Shape palettes for overlapping and non-overlapping
  13 + points.
14 14 }
15 15 \note{
16   - In the Elements of Graphing Data, Cleveland suggests two
17   - shapes palettes for scatter plots: one for overlapping
18   - data and one for non-overlapping data. The pattern for
19   - overlapping data relies on pattern discrimination, while
20   - the symbols for non-overlapping data varies the amount of
21   - fill. This palatte attempts to create these palettes.
22   - However, I found that these were hard to replicate. Using
23   - the R shapes and unicode fonts: the symbols can vary in
24   - size, they are dependent of the fonts used, and there
25   - does not exist a unicode symbol for a circle with a
26   - vertical line. If someone can improve this palette,
27   - please let me know.
  16 + In the \emph{Elements of Graphing Data}, W.S. Cleveland
  17 + suggests two shape palettes for scatter plots: one for
  18 + overlapping data and another for non-overlapping data.
  19 + The symbols for overlapping data relies on pattern
  20 + discrimination, while the symbols for non-overlapping
  21 + data vary the amount of fill. This palatte attempts to
  22 + create these palettes. However, I found that these were
  23 + hard to replicate. Using the R shapes and unicode fonts:
  24 + the symbols can vary in size, they are dependent of the
  25 + fonts used, and there does not exist a unicode symbol for
  26 + a circle with a vertical line. If someone can improve
  27 + this palette, please let me know.
28 28
29   - Following Tremmel (1995), I replace the cirlce with a
  29 + Following Tremmel (1995), I replace the circle with a
30 30 vertical line with an encircled plus sign.
31 31 }
32 32 \examples{
33   -# xoverlapping symbol palette
  33 +# overlapping symbol palette
34 34 dsamp <- diamonds[sample(nrow(diamonds), 100), ]
35 35 (qplot(carat, price, data=dsamp, shape=cut)
36 36 + theme_bw() + scale_shape_cleveland())
@@ -39,13 +39,13 @@ dsamp <- diamonds[sample(nrow(diamonds), 100), ]
39 39 + theme_bw() + scale_shape_cleveland(overlap=FALSE))
40 40 }
41 41 \references{
42   - Cleveland WS. The Elements of Graphing Data. Revised
43   - Edition. Hobart Press, Summit, NJ, 1994, pp. 154-164,
44   - 234-239.
  42 + Cleveland WS. \emph{The Elements of Graphing Data}.
  43 + Revised Edition. Hobart Press, Summit, NJ, 1994, pp.
  44 + 154-164, 234-239.
45 45
46 46 Tremmel, Lothar, (1995) "The Visual Separability of
47   - Plotting Symbols in Scatterplots" Journal of
48   - Computational and Graphical Statistics,
  47 + Plotting Symbols in Scatterplots", \emph{Journal of
  48 + Computational and Graphical Statistics},
49 49 \url{http://www.jstor.org/stable/1390760}
50 50 }
51 51 \seealso{
8 man/colorblind.Rd
@@ -19,10 +19,10 @@
19 19 breaks, labels and so forth.}
20 20 }
21 21 \description{
22   - 8-Color Colorblind palette from
23   - \url{http://jfly.iam.u-tokyo.ac.jp/color} and the
24   - \href{http://wiki.stdout.org/rcookbook/Graphs/Colors\%20(ggplot2)}{R
25   - Cookbook}/
  22 + An 8-color colorblind safe qualitative discrete palette
  23 + from \url{http://jfly.iam.u-tokyo.ac.jp/color} and the
  24 + \href{http://wiki.stdout.org/rcookbook/Graphs/Colors%20(ggplot2)/#a-colorblind-friendly-palette}{Cookbook
  25 + for R}.
26 26 }
27 27 \examples{
28 28 library(scales)
6 man/economist_pal.Rd
@@ -11,9 +11,9 @@
11 11 \item{fill}{Use the fill palette.}
12 12 }
13 13 \description{
14   - The primary colors are blues, grays, and greens. Red is
15   - not included (early) in these palettes and should be used
16   - to indicate important data.
  14 + The hues in the palette are blues, grays, and greens. Red
  15 + is not included in these palettes and should be used to
  16 + indicate important data.
17 17 }
18 18 \examples{
19 19 library(scales)
8 man/excel_pal.Rd
@@ -5,7 +5,8 @@
5 5 excel_pal(palette = "line")
6 6 }
7 7 \arguments{
8   - \item{palette}{One of "old", "fill", or "new".}
  8 + \item{palette}{One of \code{"old"}, \code{"fill"}, or
  9 + \code{"new"}.}
9 10 }
10 11 \description{
11 12 Color palettes from Excel, both current and the pre-2007
@@ -23,4 +24,9 @@ show_col(excel_pal()(8))
23 24 show_col(excel_pal("fill")(8))
24 25 show_col(excel_pal("new")(10))
25 26 }
  27 +\seealso{
  28 + Other colour excel: \code{\link{scale_color_excel}},
  29 + \code{\link{scale_colour_excel}},
  30 + \code{\link{scale_fill_excel}}
  31 +}
26 32
2  man/few_pal.Rd
... ... @@ -1,6 +1,6 @@
1 1 \name{few_pal}
2 2 \alias{few_pal}
3   -\title{Palletes from Stephen Few (discrete)}
  3 +\title{Color Palletes from Few "Practical Rules for Using Color in Charts"}
4 4 \usage{
5 5 few_pal(palette = "medium")
6 6 }
11 man/geom_rangeframe.Rd
@@ -38,15 +38,12 @@
38 38 for more details.}
39 39 }
40 40 \description{
41   - Axis lines which show the maximum and minimum of the data
42   - plotted.
  41 + Axis lines which extend to the maximum and minimum of the
  42 + plotted data.
43 43 }
44 44 \section{Aesthetics}{
45   - \code{geom_RangeFrame} understands the following
46   - aesthetics (required aesthetics are in bold):
47   -
48   - \itemize{ \item \code{alpha} \item \code{colour} \item
49   - \code{linetype} \item \code{size} }
  45 + \Sexpr[results=rd,stage=build]{ggthemes:::rd_aesthetics("geom_tufteboxplot",
  46 + ggthemes:::GeomRangeFrame)}
50 47 }
51 48 \examples{
52 49 (ggplot(mtcars, aes(wt, mpg))
4 man/geom_tufteboxplot.Rd
@@ -46,9 +46,7 @@
46 46 }
47 47 \description{
48 48 Edward Tufte's revision of the box plot erases the box
49   - and replaces it with a single middle point. What is
50   - usually represented by notches in a standard box plot is
51   - represented by a box with a line for the median.
  49 + and replaces it with a single point and the whiskers.
52 50 }
53 51 \section{Aesthetics}{
54 52 \Sexpr[results=rd,stage=build]{ggthemes:::rd_aesthetics("geom_tufteboxplot",
2  man/ggthemes.Rd
@@ -5,7 +5,7 @@
5 5 \title{ggthemes}
6 6 \description{
7 7 This package contains extra themes, scales, and geoms,
8   - and functions for and related to \bold{ggplot2}.
  8 + and functions for and related to \pkg{ggplot2}.
9 9 }
10 10 \details{
11 11 In addtion to the help pages, see the REAMDE page on
56 man/ggthemes_data.Rd
@@ -2,54 +2,22 @@
2 2 \name{ggthemes_data}
3 3 \alias{ggthemes_data}
4 4 \title{Palette data for ggthemes package}
5   -\format{A \code{list}.
6   -\describe{
7   -\item{economist}{
8   -Colors from The Economist magazine. RGB values taken from
9   -the economist scheme in Stata. \code{bg} are background
10   -colors, \code{fg} are foreground colors.
11   -}
12   -\item{excel}{
13   -\code{list} Various Excel color palettes.
14   -\code{line} The Excel 2003 line color palette.
15   -\code{fill} The Excel 2003 bar chart color palette.
16   -\code{new} Color palette from more recent versions of Excel.
17   -Color RGB values from \url{http://vis.stanford.edu/color-names/analyzer/}.
18   -}
19   -\item{solarized}{
20   -Names and RGB values of the Solarized palette.
21   -\url{http://ethanschoonover.com/solarized}.
22   -\code{base} Base colors.
23   -\code{accent} Accent colors.
24   -}
25   -\item{stata}{
26   -Colors, shapes, and linetypes used by Stata
27   -\code{colors} RBG values of of all Stata colors.
28   -\code{shapes} R shape values of of all Stata symbol types.
29   -\code{linetype} Equivalent R linepattern for all Stata linepattern sytles. \url{http://www.stata.com/help.cgi?symbolstyle}.
30   -}
31   -\item{few}{
32   -Qualitative color palettes from Stephen Few,
33   -\href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical Rules for Using Color in Charts"}.
34   -He suggests using \code{medium}, except for thin lines and small points, for which use \code{dark}.
35   -}
36   -\item{tableau}{Color and shapes used by Tableau}
37   -\item{manyeyes}{
38   -Color palette from \href{http://www-958.ibm.com/software/data/cognos/manyeyes/}{IBM Many Eyes};
39   -values from \url{http://vis.stanford.edu/color-names/analyzer/}.
40   -}
41   -\item{wsj}{
42   -Colors used in \code{\link{theme_wsj}} and \code{\link{scale_colour_wsj}}.
43   -}
44   -\item{colorblind}{
45   -Colorblind palette from \url{http://jfly.iam.u-tokyo.ac.jp/color/}
46   -}
47   -}}
  5 +\format{List of 9
  6 + $ economist :List of 3
  7 + $ excel :List of 3
  8 + $ solarized :List of 2
  9 + $ stata :List of 3
  10 + $ few :List of 3
  11 + $ tableau :List of 2
  12 + $ manyeyes : chr [1:19] "#9c9ede" "#7375b5" "#4a5584" "#cedb9c" ...
  13 + $ wsj :List of 2
  14 + $ colorblind: Named chr [1:8] "#000000" "#E69F00" "#56B4E9" "#009E73" ...
  15 + ..- attr(*, "names")= chr [1:8] "black" "orange" "sky_blue" "bluish_green" ...}
48 16 \usage{
49 17 ggthemes_data
50 18 }
51 19 \description{
52   - List with the data used by palettes in the ggthemes
  20 + List with the data used by the palettes in the ggthemes
53 21 package.
54 22 }
55 23 \keyword{datasets}
3  man/scale_color_tableau.Rd
@@ -18,8 +18,7 @@
18 18 \item{palette}{Palette name}
19 19 }
20 20 \description{
21   - Color scales used by
22   - \href{http://www.tableausoftware.com/}{Trableau}.
  21 + See \code{\link{tableau_color_pal}} for details.
23 22 }
24 23 \examples{
25 24 dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
2  man/scale_economist.Rd
@@ -20,8 +20,6 @@
20 20 }
21 21 \description{
22 22 Color scales using the colors in the Economist graphics.
23   - These scales use RGB values and ordering of the colors in
24   - the Stata economist scheme.
25 23 }
26 24 \seealso{
27 25 \code{\link{theme_economist}} for examples.
9 man/scale_excel.Rd
@@ -11,14 +11,15 @@
11 11 scale_color_excel(palette = "fill", ...)
12 12 }
13 13 \arguments{
14   - \item{palette}{One of "old", "fill", or "new".}
  14 + \item{palette}{One of \code{"old"}, \code{"fill"}, or
  15 + \code{"new"}.}
15 16
16 17 \item{...}{Other arguments passed on to
17 18 \code{\link{discrete_scale}} to control name, limits,
18 19 breaks, labels and so forth.}
19 20 }
20 21 \description{
21   - Excel color scales
  22 + Color scales from both old and new Excel.
22 23 }
23 24 \examples{
24 25 dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
@@ -29,8 +30,6 @@ dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
29 30 \seealso{
30 31 See \code{\link{theme_excel}} for examples.
31 32
32   - Other colour scales: \code{\link{scale_color_solarized}},
33   - \code{\link{scale_colour_solarized}},
34   - \code{\link{scale_fill_solarized}}
  33 + Other colour excel: \code{\link{excel_pal}}
35 34 }
36 35
19 man/scale_few.Rd
@@ -2,7 +2,7 @@
2 2 \alias{scale_color_few}
3 3 \alias{scale_colour_few}
4 4 \alias{scale_fill_few}
5   -\title{Few "Practical Rules for Using Color in Charts" color scales}
  5 +\title{Color scales from Few "Practical Rules for Using Color in Charts"}
6 6 \usage{
7 7 scale_colour_few(palette = "medium", ...)
8 8
@@ -18,22 +18,7 @@
18 18 \item{palette}{One of "medium", "dark", or "light"}
19 19 }
20 20 \description{
21   - Qualitative color scales from Stephen Few,
22   - \href{http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf}{"Practical
23   - Rules for Using Color in Charts"}.
24   -}
25   -\examples{
26   -dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
27   -(qplot(carat, price, data=dsamp, colour=clarity)
28   -+ theme_few()
29   -+ scale_colour_few())
30   -(qplot(carat, price, data=dsamp, colour=clarity)
31   -+ theme_few()
32   -+ scale_colour_few("dark"))
33   -(ggplot(diamonds, aes(clarity, fill=cut))
34   -+ geom_bar()
35   -+ theme_few()
36   -+ scale_fill_few("light"))
  21 + See \code{\link{few_pal}}.
37 22 }
38 23 \seealso{
39 24 Other colour few: \code{\link{few_pal}}
2  man/scale_linetype_stata.Rd
@@ -11,7 +11,7 @@
11 11 \code{\link{discrete_scale}} for more details}
12 12 }
13 13 \description{
14   - Linetype scale based on the linepatterns used in Stata.
  14 + See \code{\link{stata_linetype_pal}} for details.
15 15 }
16 16 \examples{
17 17 library(reshape2) # for melt
3  man/scale_shape_stata.Rd
@@ -11,8 +11,7 @@
11 11 \code{\link{discrete_scale}} for more details}
12 12 }
13 13 \description{
14   - Shape scale palette based on the symbol palette in Stata,
15   - specifically the one in scheme s1mono.
  14 + See \code{\link{stata_shape_pal}} for details.
16 15 }
17 16 \examples{
18 17 dsmall <- diamonds[sample(nrow(diamonds), 100), ]
3  man/scale_shape_tableau.Rd
@@ -13,8 +13,7 @@
13 13 \code{\link{discrete_scale}} for more details}
14 14 }
15 15 \description{
16   - Shape scales used by
17   - \href{http://www.tableausoftware.com/}{Trableau}.
  16 + See \code{\link{tableau_shape_pal}} for details.
18 17 }
19 18 \examples{
20 19 dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
10 man/scale_solarized.Rd
@@ -15,11 +15,11 @@
15 15 \code{\link{discrete_scale}} to control name, limits,
16 16 breaks, labels and so forth.}
17 17
18   - \item{accent}{\code{character} Primary accent color.}
  18 + \item{accent}{\code{character} Starting color. One of
  19 + \Sexpr[results=rd,stage=build]{ggthemes:::solarized_accent_list()}}
19 20 }
20 21 \description{
21   - Accent color theme for Solarized. Primarily for use with
22   - \code{\link{theme_solarized}}.
  22 + See \code{\link{solarized_pal}} for details.
23 23 }
24 24 \examples{
25 25 dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
@@ -28,10 +28,6 @@ dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
28 28 + scale_colour_solarized() )
29 29 }
30 30 \seealso{
31   - Other colour scales: \code{\link{scale_color_excel}},
32   - \code{\link{scale_colour_excel}},
33   - \code{\link{scale_fill_excel}}
34   -
35 31 Other solarized colour: \code{\link{solarized_pal}}
36 32 }
37 33
6 man/scale_stata.Rd
@@ -11,15 +11,15 @@
11 11 scale_color_stata(scheme = "s2color", ...)
12 12 }
13 13 \arguments{
14   - \item{scheme}{\code{character}. One of "s2color",
15   - "s1rcolor", "s1color", or "mono".}
  14 + \item{scheme}{\code{character}. One of \code{"s2color"},
  15 + \code{"s1rcolor"}, \code{"s1color"}, or \code{"mono"}.}
16 16
17 17 \item{...}{Other arguments passed on to
18 18 \code{\link{discrete_scale}} to control name, limits,
19 19 breaks, labels and so forth.}
20 20 }
21 21 \description{
22   - Color scales using the color palettes from Stata.
  22 + See \code{\link{stata_pal}} for details.
23 23 }
24 24 \examples{
25 25 dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
17 man/solarized_pal.Rd
@@ -5,14 +5,19 @@
5 5 solarized_pal(accent = "blue")
6 6 }
7 7 \arguments{
8   - \item{accent}{\code{character} Primary accent color.}
  8 + \item{accent}{\code{character} Starting color. One of
  9 + \Sexpr[results=rd,stage=build]{ggthemes:::solarized_accent_list()}}
9 10 }
10 11 \description{
11   - Solarized accents palette from
12   - \url{http://ethanschoonover.com/solarized}. The colors
13   - chosen are the combination of colors that maximize the
14   - total Euclidean distance between colors in L*a*b space,
15   - given a primary accent.
  12 + Qualitative color palate based on the Ethan Schoonover's
  13 + Solarized palette,
  14 + \url{http://ethanschoonover.com/solarized}.
  15 +}
  16 +\note{
  17 + For a given starting color and number of colors in the
  18 + palette, the other colors are the combination of colors
  19 + that maximizes the total Euclidean distance between
  20 + colors in L*a*b space.
16 21 }
17 22 \examples{
18 23 library(scales)
4 man/solarized_rebase.Rd
@@ -9,10 +9,10 @@
9 9
10 10 Creates the base colors for a light or dark solarized
11 11 theme. See \url{http://ethanschoonover.com/solarized}.
12   - The idea for this function comes from the CSS style
13   - example.}
  12 + This function is a port of the CSS style example.}
14 13 }
15 14 \description{
16 15 Base colors for Solarized light and dark themes
17 16 }
  17 +\keyword{internal}
18 18
9 man/stata_pal.Rd
@@ -5,12 +5,13 @@
5 5 stata_pal(scheme = "s2color")
6 6 }
7 7 \arguments{
8   - \item{scheme}{\code{character}. One of "s2color",
9   - "s1rcolor", "s1color", or "mono".}
  8 + \item{scheme}{\code{character}. One of \code{"s2color"},
  9 + \code{"s1rcolor"}, \code{"s1color"}, or \code{"mono"}.}
10 10 }
11 11 \description{
12   - Stata color palettes. See Stata documentation for
13   - schemes: \url{http://www.stata.com/help.cgi?schemes}
  12 + Stata color palettes. See Stata documentation for a
  13 + description of the schemes,
  14 + \url{http://www.stata.com/help.cgi?schemes}.
14 15 }
15 16 \examples{
16 17 library(scales)
2  man/stata_shape_pal.Rd
@@ -6,7 +6,7 @@
6 6 }
7 7 \description{
8 8 Shape palette based on the symbol palette in Stata,
9   - specifically the scheme s2mono.
  9 + specifically that for the scheme s2mono.
10 10 }
11 11 \seealso{
12 12 See \code{\link{scale_shape_stata}} for examples.
6 man/tableau_color_pal.Rd
... ... @@ -1,6 +1,6 @@
1 1 \name{tableau_color_pal}
2 2 \alias{tableau_color_pal}
3   -\title{Tableau Color Palettes (discrete)}
  3 +\title{Color Palettes based on Tableau (discrete)}
4 4 \usage{
5 5 tableau_color_pal(palette = "tableau10")
6 6 }
@@ -8,8 +8,8 @@
8 8 \item{palette}{Palette name}
9 9 }
10 10 \description{
11   - Color palettes used by
12   - \href{http://www.tableausoftware.com/}{Trableau}.
  11 + Color palettes used in
  12 + \href{http://www.tableausoftware.com/}{Tableau}.
13 13 }
14 14 \examples{
15 15 library(scales)
4 man/tableau_shape_pal.Rd
... ... @@ -1,6 +1,6 @@
1 1 \name{tableau_shape_pal}
2 2 \alias{tableau_shape_pal}
3   -\title{Tabaleau Shape Palettes (discrete)}
  3 +\title{Tableau Shape Palettes (discrete)}
4 4 \usage{
5 5 tableau_shape_pal(palette = "default")
6 6 }
@@ -9,7 +9,7 @@