Browse Source

Fixes #29

tags/v0.4.0
boB Rudis 7 years ago
parent
commit
02590ea5d9
  1. 4
      DESCRIPTION
  2. 63
      R/coord_proj.r
  3. 2
      README.Rmd
  4. 14
      README.md
  5. BIN
      README_figs/README-bkde2d-1.png
  6. BIN
      README_figs/README-bkde2d-2.png
  7. BIN
      README_figs/README-bkde_ash-1.png
  8. BIN
      README_figs/README-bkde_ash-2.png
  9. BIN
      README_figs/README-bkde_ash-3.png
  10. BIN
      README_figs/README-bkde_ash-4.png
  11. BIN
      README_figs/README-bkde_ash-5.png
  12. BIN
      README_figs/README-bkde_ash-6.png
  13. BIN
      README_figs/README-bkde_ash-7.png
  14. BIN
      README_figs/README-bkde_ash-8.png
  15. BIN
      README_figs/README-coord_proj-1.png
  16. BIN
      README_figs/README-dumbbell-1.png
  17. BIN
      README_figs/README-encircle-1.png
  18. BIN
      README_figs/README-encircle-2.png
  19. BIN
      README_figs/README-encircle-3.png
  20. BIN
      README_figs/README-encircle-4.png
  21. BIN
      README_figs/README-encircle-5.png
  22. BIN
      README_figs/README-encircle-6.png
  23. BIN
      README_figs/README-encircle-7.png
  24. BIN
      README_figs/README-lollipop-1.png
  25. BIN
      README_figs/README-splines-1.png
  26. BIN
      README_figs/README-splines-2.png
  27. BIN
      README_figs/README-splines-3.png
  28. BIN
      README_figs/README-splines-4.png
  29. BIN
      README_figs/README-splines-5.png
  30. BIN
      README_figs/README-splines-6.png
  31. BIN
      README_figs/README-splines-7.png
  32. BIN
      README_figs/README-splines-8.png
  33. BIN
      README_figs/README-stateface-1.png
  34. BIN
      README_figs/README-stepribbon-1.png
  35. BIN
      README_figs/README-stepribbon-2.png
  36. 1
      man/absoluteGrob.Rd
  37. 1
      man/annotate_textp.Rd
  38. 5
      man/byte_format.Rd
  39. 3
      man/coord_proj.Rd
  40. 1
      man/fortify.table.Rd
  41. 2
      man/geom_bkde.Rd
  42. 2
      man/geom_bkde2d.Rd
  43. 2
      man/geom_cartogram.Rd
  44. 2
      man/geom_dumbbell.Rd
  45. 1
      man/geom_encircle.Rd
  46. 2
      man/geom_lollipop.Rd
  47. 1
      man/geom_stateface.Rd
  48. 2
      man/geom_xspline.Rd
  49. 7
      man/geom_xspline2.Rd
  50. 18
      man/ggalt-ggproto.Rd
  51. 1
      man/ggalt.Rd
  52. 1
      man/ggplot2-ggproto.Rd
  53. 1
      man/list_avatars.Rd
  54. 1
      man/load_stateface.Rd
  55. 1
      man/pokemon_pal.Rd
  56. 3
      man/scale_pokemon.Rd
  57. 1
      man/show_stateface.Rd
  58. 2
      man/stat_ash.Rd
  59. 1
      man/stat_stepribbon.Rd

4
DESCRIPTION

@ -1,7 +1,7 @@
Package: ggalt Package: ggalt
Title: Extra Coordinate Systems, 'Geoms', Statistical Transformations, Scales Title: Extra Coordinate Systems, 'Geoms', Statistical Transformations, Scales
and Fonts for 'ggplot2' and Fonts for 'ggplot2'
Version: 0.3.1.9000 Version: 0.4
Maintainer: Bob Rudis <bob@rudis.net> Maintainer: Bob Rudis <bob@rudis.net>
Authors@R: c( Authors@R: c(
person("Bob", "Rudis", email = "bob@rudis.net", role = c("aut", "cre")), person("Bob", "Rudis", email = "bob@rudis.net", role = c("aut", "cre")),
@ -44,7 +44,7 @@ Imports:
MASS, MASS,
extrafont, extrafont,
plotly (>= 3.4.1) plotly (>= 3.4.1)
RoxygenNote: 5.0.1 RoxygenNote: 6.0.0
VignetteBuilder: knitr VignetteBuilder: knitr
Collate: Collate:
'a-pokemon-colors.r' 'a-pokemon-colors.r'

63
R/coord_proj.r

@ -14,7 +14,7 @@
#' #'
#' \if{latex}{ #' \if{latex}{
#' A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection: #' A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection:
#' #'``
#' \figure{coordproj01.png}{options: width=10cm} #' \figure{coordproj01.png}{options: width=10cm}
#' } #' }
#' #'
@ -100,19 +100,20 @@ coord_proj <- function(proj=NULL, inverse = FALSE, degrees = TRUE,
#' @export #' @export
CoordProj <- ggproto("CoordProj", Coord, CoordProj <- ggproto("CoordProj", Coord,
transform = function(self, data, scale_details) { transform = function(self, data, panel_params) {
trans <- project4(self, data$x, data$y) trans <- project4(self, data$x, data$y)
out <- cunion(trans[c("x", "y")], data) out <- cunion(trans[c("x", "y")], data)
out$x <- rescale(out$x, 0:1, scale_details$x.proj) out$x <- rescale(out$x, 0:1, panel_params$x.proj)
out$y <- rescale(out$y, 0:1, scale_details$y.proj) out$y <- rescale(out$y, 0:1, panel_params$y.proj)
out out
}, },
distance = function(x, y, scale_details) { distance = function(x, y, panel_params) {
max_dist <- dist_central_angle(scale_details$x.range, scale_details$y.range) max_dist <- dist_central_angle(panel_params$x.range, panel_params$y.range)
dist_central_angle(x, y) / max_dist dist_central_angle(x, y) / max_dist
}, },
@ -120,13 +121,13 @@ CoordProj <- ggproto("CoordProj", Coord,
diff(ranges$y.proj) / diff(ranges$x.proj) diff(ranges$y.proj) / diff(ranges$x.proj)
}, },
train = function(self, scale_details) { setup_panel_params = function(self, scale_x, scale_y, params = list()) {
# range in scale # range in scale
ranges <- list() ranges <- list()
for (n in c("x", "y")) { for (n in c("x", "y")) {
scale <- scale_details[[n]] scale <- get(paste0("scale_", n))
limits <- self$limits[[n]] limits <- self$limits[[n]]
if (is.null(limits)) { if (is.null(limits)) {
@ -153,7 +154,8 @@ CoordProj <- ggproto("CoordProj", Coord,
ret$y$proj <- proj[3:4] ret$y$proj <- proj[3:4]
for (n in c("x", "y")) { for (n in c("x", "y")) {
out <- scale_details[[n]]$break_info(ranges[[n]]) out <- get(paste0("scale_", n))$break_info(ranges[[n]])
# out <- panel_params[[n]]$break_info(ranges[[n]])
ret[[n]]$range <- out$range ret[[n]]$range <- out$range
ret[[n]]$major <- out$major_source ret[[n]]$major <- out$major_source
ret[[n]]$minor <- out$minor_source ret[[n]]$minor <- out$minor_source
@ -170,9 +172,10 @@ CoordProj <- ggproto("CoordProj", Coord,
details details
}, },
render_bg = function(self, scale_details, theme) { render_bg = function(self, panel_params, theme) {
xrange <- expand_range(scale_details$x.range, 0.2)
yrange <- expand_range(scale_details$y.range, 0.2) xrange <- expand_range(panel_params$x.range, 0.2)
yrange <- expand_range(panel_params$y.range, 0.2)
# Limit ranges so that lines don't wrap around globe # Limit ranges so that lines don't wrap around globe
xmid <- mean(xrange) xmid <- mean(xrange)
@ -182,17 +185,17 @@ CoordProj <- ggproto("CoordProj", Coord,
yrange[yrange < ymid - 90] <- ymid - 90 yrange[yrange < ymid - 90] <- ymid - 90
yrange[yrange > ymid + 90] <- ymid + 90 yrange[yrange > ymid + 90] <- ymid + 90
xgrid <- with(scale_details, expand.grid( xgrid <- with(panel_params, expand.grid(
y = c(seq(yrange[1], yrange[2], length.out = 50), NA), y = c(seq(yrange[1], yrange[2], length.out = 50), NA),
x = x.major x = x.major
)) ))
ygrid <- with(scale_details, expand.grid( ygrid <- with(panel_params, expand.grid(
x = c(seq(xrange[1], xrange[2], length.out = 50), NA), x = c(seq(xrange[1], xrange[2], length.out = 50), NA),
y = y.major y = y.major
)) ))
xlines <- self$transform(xgrid, scale_details) xlines <- self$transform(xgrid, panel_params)
ylines <- self$transform(ygrid, scale_details) ylines <- self$transform(ygrid, panel_params)
if (nrow(xlines) > 0) { if (nrow(xlines) > 0) {
grob.xlines <- element_render( grob.xlines <- element_render(
@ -218,49 +221,49 @@ CoordProj <- ggproto("CoordProj", Coord,
)) ))
}, },
render_axis_h = function(self, scale_details, theme) { render_axis_h = function(self, panel_params, theme) {
arrange <- scale_details$x.arrange %||% c("primary", "secondary") arrange <- panel_params$x.arrange %||% c("primary", "secondary")
if (is.null(scale_details$x.major)) { if (is.null(panel_params$x.major)) {
return(list( return(list(
top = zeroGrob(), top = zeroGrob(),
bottom = zeroGrob() bottom = zeroGrob()
)) ))
} }
x_intercept <- with(scale_details, data.frame( x_intercept <- with(panel_params, data.frame(
x = x.major, x = x.major,
y = y.range[1] y = y.range[1]
)) ))
pos <- self$transform(x_intercept, scale_details) pos <- self$transform(x_intercept, panel_params)
axes <- list( axes <- list(
bottom = guide_axis(pos$x, scale_details$x.labels, "bottom", theme), bottom = guide_axis(pos$x, panel_params$x.labels, "bottom", theme),
top = guide_axis(pos$x, scale_details$x.labels, "top", theme) top = guide_axis(pos$x, panel_params$x.labels, "top", theme)
) )
axes[[which(arrange == "secondary")]] <- zeroGrob() axes[[which(arrange == "secondary")]] <- zeroGrob()
axes axes
}, },
render_axis_v = function(self, scale_details, theme) { render_axis_v = function(self, panel_params, theme) {
arrange <- scale_details$y.arrange %||% c("primary", "secondary") arrange <- panel_params$y.arrange %||% c("primary", "secondary")
if (is.null(scale_details$y.major)) { if (is.null(panel_params$y.major)) {
return(list( return(list(
left = zeroGrob(), left = zeroGrob(),
right = zeroGrob() right = zeroGrob()
)) ))
} }
x_intercept <- with(scale_details, data.frame( x_intercept <- with(panel_params, data.frame(
x = x.range[1], x = x.range[1],
y = y.major y = y.major
)) ))
pos <- self$transform(x_intercept, scale_details) pos <- self$transform(x_intercept, panel_params)
axes <- list( axes <- list(
left = guide_axis(pos$y, scale_details$y.labels, "left", theme), left = guide_axis(pos$y, panel_params$y.labels, "left", theme),
right = guide_axis(pos$y, scale_details$y.labels, "right", theme) right = guide_axis(pos$y, panel_params$y.labels, "right", theme)
) )
axes[[which(arrange == "secondary")]] <- zeroGrob() axes[[which(arrange == "secondary")]] <- zeroGrob()
axes axes

2
README.Rmd

@ -182,7 +182,7 @@ world <- map_data("world")
world <- world[world$region != "Antarctica",] world <- world[world$region != "Antarctica",]
gg <- ggplot() gg <- ggplot()
gg <- gg + geom_map(data=world, map=world, gg <- gg + geom_cartogram(data=world, map=world,
aes(x=long, y=lat, map_id=region)) aes(x=long, y=lat, map_id=region))
gg <- gg + coord_proj("+proj=wintri") gg <- gg + coord_proj("+proj=wintri")
gg gg

14
README.md

@ -39,7 +39,7 @@ library(ggalt)
# current verison # current verison
packageVersion("ggalt") packageVersion("ggalt")
#> [1] '0.3.0.9000' #> [1] '0.4'
set.seed(1492) set.seed(1492)
dat <- data.frame(x=c(1:10, 1:10, 1:10), dat <- data.frame(x=c(1:10, 1:10, 1:10),
@ -64,6 +64,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point() + geom_point() +
geom_line() + geom_line() +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) geom_smooth(se=FALSE, linetype="dashed", size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-2.png" width="672" /> <img src="README_figs/README-splines-2.png" width="672" />
@ -74,6 +75,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(size=0.5) geom_xspline(size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-3.png" width="672" /> <img src="README_figs/README-splines-3.png" width="672" />
@ -84,6 +86,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(spline_shape=-0.4, size=0.5) geom_xspline(spline_shape=-0.4, size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-4.png" width="672" /> <img src="README_figs/README-splines-4.png" width="672" />
@ -94,6 +97,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(spline_shape=0.4, size=0.5) geom_xspline(spline_shape=0.4, size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-5.png" width="672" /> <img src="README_figs/README-splines-5.png" width="672" />
@ -104,6 +108,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(spline_shape=1, size=0.5) geom_xspline(spline_shape=1, size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-6.png" width="672" /> <img src="README_figs/README-splines-6.png" width="672" />
@ -114,6 +119,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(spline_shape=0, size=0.5) geom_xspline(spline_shape=0, size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-7.png" width="672" /> <img src="README_figs/README-splines-7.png" width="672" />
@ -124,6 +130,7 @@ ggplot(dat, aes(x, y, group=group, color=factor(group))) +
geom_point(color="black") + geom_point(color="black") +
geom_smooth(se=FALSE, linetype="dashed", size=0.5) + geom_smooth(se=FALSE, linetype="dashed", size=0.5) +
geom_xspline(spline_shape=-1, size=0.5) geom_xspline(spline_shape=-1, size=0.5)
#> `geom_smooth()` using method = 'loess' and formula 'y ~ x'
``` ```
<img src="README_figs/README-splines-8.png" width="672" /> <img src="README_figs/README-splines-8.png" width="672" />
@ -248,13 +255,10 @@ m + stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon")
``` r ``` r
world <- map_data("world") world <- map_data("world")
#>
#> # maps v3.1: updated 'world': all lakes moved to separate new #
#> # 'lakes' database. Type '?world' or 'news(package="maps")'. #
world <- world[world$region != "Antarctica",] world <- world[world$region != "Antarctica",]
gg <- ggplot() gg <- ggplot()
gg <- gg + geom_map(data=world, map=world, gg <- gg + geom_cartogram(data=world, map=world,
aes(x=long, y=lat, map_id=region)) aes(x=long, y=lat, map_id=region))
gg <- gg + coord_proj("+proj=wintri") gg <- gg + coord_proj("+proj=wintri")
gg gg

BIN
README_figs/README-bkde2d-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 235 KiB

BIN
README_figs/README-bkde2d-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 111 KiB

BIN
README_figs/README-bkde_ash-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
README_figs/README-bkde_ash-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
README_figs/README-bkde_ash-3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
README_figs/README-bkde_ash-4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
README_figs/README-bkde_ash-5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

BIN
README_figs/README-bkde_ash-6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

BIN
README_figs/README-bkde_ash-7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 89 KiB

BIN
README_figs/README-bkde_ash-8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 84 KiB

BIN
README_figs/README-coord_proj-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 183 KiB

BIN
README_figs/README-dumbbell-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 114 KiB

BIN
README_figs/README-encircle-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

BIN
README_figs/README-encircle-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
README_figs/README-encircle-3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

BIN
README_figs/README-encircle-4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
README_figs/README-encircle-5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 48 KiB

BIN
README_figs/README-encircle-6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

BIN
README_figs/README-encircle-7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 84 KiB

BIN
README_figs/README-lollipop-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 148 KiB

BIN
README_figs/README-splines-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 110 KiB

BIN
README_figs/README-splines-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB

BIN
README_figs/README-splines-3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 138 KiB

BIN
README_figs/README-splines-4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

BIN
README_figs/README-splines-5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

BIN
README_figs/README-splines-6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 131 KiB

BIN
README_figs/README-splines-7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

BIN
README_figs/README-splines-8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

BIN
README_figs/README-stateface-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

BIN
README_figs/README-stepribbon-1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
README_figs/README-stepribbon-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 39 KiB

1
man/absoluteGrob.Rd

@ -14,4 +14,3 @@ This grob has fixed dimensions and position.
It's still experimental It's still experimental
} }
\keyword{internal} \keyword{internal}

1
man/annotate_textp.Rd

@ -39,4 +39,3 @@ p <- ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()
p <- p + geom_smooth(method = "lm", se = FALSE) p <- p + geom_smooth(method = "lm", se = FALSE)
p + annotate_textp(x = 0.9, y = 0.35, label="A relative linear\\nrelationship", hjust=1, color="red") p + annotate_textp(x = 0.9, y = 0.35, label="A relative linear\\nrelationship", hjust=1, color="red")
} }

5
man/byte_format.Rd

@ -1,10 +1,10 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/formatters.r % Please edit documentation in R/formatters.r
\name{byte_format} \name{byte_format}
\alias{Gb} \alias{byte_format}
\alias{Kb} \alias{Kb}
\alias{Mb} \alias{Mb}
\alias{byte_format} \alias{Gb}
\alias{bytes} \alias{bytes}
\title{Bytes formatter: convert to byte measurement and display symbol.} \title{Bytes formatter: convert to byte measurement and display symbol.}
\usage{ \usage{
@ -47,4 +47,3 @@ bytes(sample(3000000000, 10))
Units of Information (Wikipedia) : Units of Information (Wikipedia) :
\url{http://en.wikipedia.org/wiki/Units_of_information} \url{http://en.wikipedia.org/wiki/Units_of_information}
} }

3
man/coord_proj.Rd

@ -45,7 +45,7 @@ A sample of the output from \code{coord_proj()} using the Winkel-Tripel projecti
\if{latex}{ \if{latex}{
A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection: A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection:
``
\figure{coordproj01.png}{options: width=10cm} \figure{coordproj01.png}{options: width=10cm}
} }
} }
@ -90,4 +90,3 @@ gg <- gg + coord_proj(
" +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs")) " +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"))
gg gg
} }

1
man/fortify.table.Rd

@ -16,4 +16,3 @@
\description{ \description{
Fortify contingency tables Fortify contingency tables
} }

2
man/geom_bkde.Rd

@ -119,6 +119,7 @@ are in bold):
\item{scaled}{density estimate, scaled to maximum of 1} \item{scaled}{density estimate, scaled to maximum of 1}
} }
} }
\examples{ \examples{
data(geyser, package="MASS") data(geyser, package="MASS")
@ -139,4 +140,3 @@ See \code{\link{geom_histogram}}, \code{\link{geom_freqpoly}} for
other methods of displaying continuous distribution. other methods of displaying continuous distribution.
See \code{\link{geom_violin}} for a compact density display. See \code{\link{geom_violin}} for a compact density display.
} }

2
man/geom_bkde2d.Rd

@ -109,6 +109,7 @@ A sample of the output from \code{geom_bkde2d()}:
Same as \code{\link{stat_contour}} Same as \code{\link{stat_contour}}
} }
\examples{ \examples{
m <- ggplot(faithful, aes(x = eruptions, y = waiting)) + m <- ggplot(faithful, aes(x = eruptions, y = waiting)) +
geom_point() + geom_point() +
@ -139,4 +140,3 @@ d + stat_bkde2d(bandwidth=c(0.5, 0.5), geom = "point",
\code{\link{geom_contour}} for contour drawing geom, \code{\link{geom_contour}} for contour drawing geom,
\code{\link{stat_sum}} for another way of dealing with overplotting \code{\link{stat_sum}} for another way of dealing with overplotting
} }

2
man/geom_cartogram.Rd

@ -60,6 +60,7 @@ This replicates the old behaviour of \code{geom_map()}, enabling specifying of
\aesthetics{geom}{cartogram} \aesthetics{geom}{cartogram}
} }
\examples{ \examples{
# When using geom_polygon, you will typically need two data frames: # When using geom_polygon, you will typically need two data frames:
# one contains the coordinates of each polygon (positions), and the # one contains the coordinates of each polygon (positions), and the
@ -114,4 +115,3 @@ if (require(maps)) {
facet_wrap( ~ variable) facet_wrap( ~ variable)
} }
} }

2
man/geom_dumbbell.Rd

@ -64,6 +64,7 @@ alternative to the clustered bar chart or slope graph.
\Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "segment")} \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "segment")}
} }
\examples{ \examples{
df <- data.frame(trt=LETTERS[1:5], df <- data.frame(trt=LETTERS[1:5],
l=c(20, 40, 10, 30, 50), l=c(20, 40, 10, 30, 50),
@ -71,4 +72,3 @@ df <- data.frame(trt=LETTERS[1:5],
ggplot(df, aes(y=trt, x=l, xend=r)) + geom_dumbbell() ggplot(df, aes(y=trt, x=l, xend=r)) + geom_dumbbell()
} }

1
man/geom_encircle.Rd

@ -79,4 +79,3 @@ gg + geom_encircle(data=ss, colour="blue", s_shape=0.9, expand=0.07) +
\author{ \author{
Ben Bolker Ben Bolker
} }

2
man/geom_lollipop.Rd

@ -83,6 +83,7 @@ A sample of the output from \code{geom_lollipop()}:
\Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "point")} \Sexpr[results=rd,stage=build]{ggplot2:::rd_aesthetics("geom", "point")}
} }
\examples{ \examples{
df <- data.frame(trt=LETTERS[1:10], df <- data.frame(trt=LETTERS[1:10],
value=seq(100, 10, by=-10)) value=seq(100, 10, by=-10))
@ -91,4 +92,3 @@ ggplot(df, aes(trt, value)) + geom_lollipop()
ggplot(df, aes(value, trt)) + geom_lollipop(horizontal=TRUE) ggplot(df, aes(value, trt)) + geom_lollipop(horizontal=TRUE)
} }

1
man/geom_stateface.Rd

@ -114,4 +114,3 @@ gg
Other StateFace operations: \code{\link{load_stateface}}, Other StateFace operations: \code{\link{load_stateface}},
\code{\link{show_stateface}} \code{\link{show_stateface}}
} }

2
man/geom_xspline.Rd

@ -130,6 +130,7 @@ are in bold):
\item{y} \item{y}
} }
} }
\examples{ \examples{
set.seed(1492) set.seed(1492)
dat <- data.frame(x=c(1:10, 1:10, 1:10), dat <- data.frame(x=c(1:10, 1:10, 1:10),
@ -192,4 +193,3 @@ Blanc, C. and Schlick, C. (1995), "X-splines : A Spline Model
Other xspline implementations: \code{\link{geom_xspline2}} Other xspline implementations: \code{\link{geom_xspline2}}
} }

7
man/geom_xspline2.Rd

@ -59,10 +59,9 @@ creates a spline curve
Alternative implemenation for connecting control points/observations Alternative implemenation for connecting control points/observations
with an X-spline with an X-spline
} }
\author{
Ben Bolker
}
\seealso{ \seealso{
Other xspline implementations: \code{\link{geom_xspline}} Other xspline implementations: \code{\link{geom_xspline}}
} }
\author{
Ben Bolker
}

18
man/ggalt-ggproto.Rd

@ -1,22 +1,25 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coord_proj.r, R/geom_ash.r, R/geom_bkde.r, R/geom_bkde2d.r, R/geom_dumbbell.R, R/geom_encircle.r, R/geom_lollipop.r, R/geom_twoway_bar.r, R/geom_xspline.r, R/geom_xspline2.r, R/stat-stepribbon.r, R/stateface.r % Please edit documentation in R/coord_proj.r, R/geom_ash.r, R/geom_bkde.r,
% R/geom_bkde2d.r, R/geom_dumbbell.R, R/geom_encircle.r, R/geom_lollipop.r,
% R/geom_twoway_bar.r, R/geom_xspline.r, R/geom_xspline2.r,
% R/stat-stepribbon.r, R/stateface.r
\docType{data} \docType{data}
\name{CoordProj} \name{CoordProj}
\alias{CoordProj} \alias{CoordProj}
\alias{StatAsh}
\alias{GeomBkde} \alias{GeomBkde}
\alias{StatBkde}
\alias{GeomBkde2d} \alias{GeomBkde2d}
\alias{StatBkde2d}
\alias{GeomDumbbell} \alias{GeomDumbbell}
\alias{GeomEncircle} \alias{GeomEncircle}
\alias{GeomLollipop} \alias{GeomLollipop}
\alias{GeomStateface}
\alias{GeomTwowayBar} \alias{GeomTwowayBar}
\alias{GeomXSpline2}
\alias{GeomXspline} \alias{GeomXspline}
\alias{StatAsh}
\alias{StatBkde}
\alias{StatBkde2d}
\alias{StatStepribbon}
\alias{StatXspline} \alias{StatXspline}
\alias{GeomXSpline2}
\alias{StatStepribbon}
\alias{GeomStateface}
\title{Geom Proto} \title{Geom Proto}
\description{ \description{
Geom Proto Geom Proto
@ -34,4 +37,3 @@ Geom Proto
} }
\keyword{datasets} \keyword{datasets}
\keyword{internal} \keyword{internal}

1
man/ggalt.Rd

@ -12,4 +12,3 @@ for ggplot2 2.0+
\author{ \author{
Bob Rudis (@hrbrmstr) Bob Rudis (@hrbrmstr)
} }

1
man/ggplot2-ggproto.Rd

@ -8,4 +8,3 @@
Geom Cartogram Geom Cartogram
} }
\keyword{datasets} \keyword{datasets}

1
man/list_avatars.Rd

@ -21,4 +21,3 @@ Warning: huge! list\cr
Other pokemon aeshetics: \code{\link{pokemon_pal}}, Other pokemon aeshetics: \code{\link{pokemon_pal}},
\code{\link{scale_colour_pokemon}} \code{\link{scale_colour_pokemon}}
} }

1
man/load_stateface.Rd

@ -14,4 +14,3 @@ et. al. devices.
Other StateFace operations: \code{\link{geom_stateface}}, Other StateFace operations: \code{\link{geom_stateface}},
\code{\link{show_stateface}} \code{\link{show_stateface}}
} }

1
man/pokemon_pal.Rd

@ -22,4 +22,3 @@ Pokémon & Pokémon character names are trademarks of Nintendo.
Other pokemon aeshetics: \code{\link{list_avatars}}, Other pokemon aeshetics: \code{\link{list_avatars}},
\code{\link{scale_colour_pokemon}} \code{\link{scale_colour_pokemon}}
} }

3
man/scale_pokemon.Rd

@ -1,8 +1,8 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pokemon.r % Please edit documentation in R/pokemon.r
\name{scale_colour_pokemon} \name{scale_colour_pokemon}
\alias{scale_color_pokemon}
\alias{scale_colour_pokemon} \alias{scale_colour_pokemon}
\alias{scale_color_pokemon}
\alias{scale_fill_pokemon} \alias{scale_fill_pokemon}
\title{Pokemon color scales} \title{Pokemon color scales}
\usage{ \usage{
@ -31,4 +31,3 @@ Pokémon & Pokémon character names are trademarks of Nintendo.
Other pokemon aeshetics: \code{\link{list_avatars}}, Other pokemon aeshetics: \code{\link{list_avatars}},
\code{\link{pokemon_pal}} \code{\link{pokemon_pal}}
} }

1
man/show_stateface.Rd

@ -15,4 +15,3 @@ the font on your system
Other StateFace operations: \code{\link{geom_stateface}}, Other StateFace operations: \code{\link{geom_stateface}},
\code{\link{load_stateface}} \code{\link{load_stateface}}
} }

2
man/stat_ash.Rd

@ -98,6 +98,7 @@ are in bold):
\item{\code{density}}{ash density estimate} \item{\code{density}}{ash density estimate}
} }
} }
\examples{ \examples{
# compare # compare
library(gridExtra) library(gridExtra)
@ -127,4 +128,3 @@ David Scott (1992), \emph{"Multivariate Density Estimation,"}
B. W. Silverman (1986), \emph{"Density Estimation for Statistics B. W. Silverman (1986), \emph{"Density Estimation for Statistics
and Data Analysis,"} Chapman & Hall. and Data Analysis,"} Chapman & Hall.
} }

1
man/stat_stepribbon.Rd

@ -74,4 +74,3 @@ gg
\references{ \references{
\url{https://groups.google.com/forum/?fromgroups=#!topic/ggplot2/9cFWHaH1CPs} \url{https://groups.google.com/forum/?fromgroups=#!topic/ggplot2/9cFWHaH1CPs}
} }

Loading…
Cancel
Save