Skip to content

Commit 40bdc73

Browse files
authored
Merge pull request #3 from tidyverse/master
update to tidyverse edition 20191118
2 parents 2fd47b8 + cb0eaa0 commit 40bdc73

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1114
-170
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ visual_test
2626
^\.github$
2727
^vignettes/profilings
2828
^cran-comments\.md$
29+
^LICENSE\.md$

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Authors@R: c(
1414
person("Claus", "Wilke", role = "aut"),
1515
person("Kara", "Woo", role = "aut"),
1616
person("Hiroaki", "Yutani", role = "aut"),
17+
person("Dewey", "Dunnington", role = "aut"),
1718
person("RStudio", role = c("cph"))
1819
)
1920
Depends:
@@ -23,22 +24,21 @@ Imports:
2324
grDevices,
2425
grid,
2526
gtable (>= 0.1.1),
27+
isoband,
2628
MASS,
2729
mgcv,
2830
reshape2,
2931
rlang (>= 0.3.0),
3032
scales (>= 0.5.0),
3133
stats,
3234
tibble,
33-
viridisLite,
3435
withr (>= 2.0.0)
3536
Suggests:
3637
covr,
3738
dplyr,
3839
ggplot2movies,
3940
hexbin,
4041
Hmisc,
41-
isoband,
4242
knitr,
4343
lattice,
4444
mapproj,

GOVERNANCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ The core developers of ggplot2 are:
4343
* [Claus Wilke](https://github.com/clauswilke)
4444
* [Kara Woo](https://github.com/karawoo)
4545
* [Hiroaki Yutani](https://github.com/yutannihilation)
46+
* [Dewey Dunnington](https://github.com/paleolimbot)
4647

4748
All core developers are bound by the [code of conduct](CODE_OF_CONDUCT.md).
4849

LICENSE.md

Lines changed: 361 additions & 0 deletions
Large diffs are not rendered by default.

NAMESPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ S3method(fortify,tbl_df)
4545
S3method(ggplot,"function")
4646
S3method(ggplot,default)
4747
S3method(ggplot_add,"NULL")
48+
S3method(ggplot_add,"function")
4849
S3method(ggplot_add,Coord)
4950
S3method(ggplot_add,Facet)
5051
S3method(ggplot_add,Layer)
@@ -105,6 +106,7 @@ S3method(makeContent,labelgrob)
105106
S3method(makeContext,dotstackGrob)
106107
S3method(merge_element,default)
107108
S3method(merge_element,element)
109+
S3method(merge_element,element_blank)
108110
S3method(plot,ggplot)
109111
S3method(predictdf,default)
110112
S3method(predictdf,glm)
@@ -297,10 +299,12 @@ export(draw_key_timeseries)
297299
export(draw_key_vline)
298300
export(draw_key_vpath)
299301
export(dup_axis)
302+
export(el_def)
300303
export(element_blank)
301304
export(element_grob)
302305
export(element_line)
303306
export(element_rect)
307+
export(element_render)
304308
export(element_text)
305309
export(enexpr)
306310
export(enexprs)

NEWS.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ggplot2 (development version)
22

3+
* `scale_x_continuous()` and `scale_y_continuous()` gains an `n.breaks` argument
4+
guiding the number of automatic generated breaks (@thomasp85, #3102)
5+
6+
* `geom_sf()` now removes rows that can't be plotted due to `NA` aesthetics
7+
(#3546, @thomasp85)
8+
39
* A new scale type has been added, that allows binning of aesthetics at the
410
scale level. It has versions for both position and non-position aesthetics and
511
comes with two new guides (`guide_bins` and `guide_coloursteps`) (@thomasp85, #3096)
@@ -14,6 +20,10 @@
1420
* `Geom` now gains a `setup_params()` method in line with the other ggproto
1521
classes (@thomasp85, #3509)
1622

23+
* Themes can now modify the theme element tree, via the
24+
`element_tree` argument. This allows extension packages to add functionality that
25+
alters the element tree (@clauswilke, #2540).
26+
1727
* `element_text()` now issues a warning when vectorized arguments are provided, as in
1828
`colour = c("red", "green", "blue")`. Such use is discouraged and not officially supported
1929
(@clauswilke, #3492).
@@ -82,12 +92,12 @@
8292

8393
* `stat_density2d()` can now take an `adjust` parameter to scale the default bandwidth. (#2860, @haleyjeppson)
8494

85-
* `geom_sf()` now removes rows that contain missing `shape`/`size`/`colour` (#3483, @yutannihilation)
86-
8795
* Fix a bug when `show.legend` is a named logical vector (#3461, @yutannihilation).
8896

8997
* Increase the default `nbin` of `guide_colourbar()` to place the ticks more precisely (#3508, @yutannihilation).
9098

99+
* `geom_sf()` now applies alpha to linestring geometries (#3589, @yutannihilation).
100+
91101
# ggplot2 3.2.1
92102

93103
This is a patch release fixing a few regressions introduced in 3.2.0 as well as

R/aes-calculated.r

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ is_calculated <- function(x) {
4242
FALSE
4343
} else if (is.symbol(x)) {
4444
is_dotted_var(as.character(x))
45+
} else if (is_quosure(x)) {
46+
is_calculated(quo_get_expr(x))
4547
} else if (is.call(x)) {
4648
if (identical(x[[1]], quote(stat))) {
4749
TRUE
@@ -66,6 +68,12 @@ strip_dots <- function(expr) {
6668
} else {
6769
expr
6870
}
71+
} else if (is_quosure(expr)) {
72+
# strip dots from quosure and reconstruct the quosure
73+
expr <- new_quosure(
74+
strip_dots(quo_get_expr(expr)),
75+
quo_get_env(expr)
76+
)
6977
} else if (is.call(expr)) {
7078
if (identical(expr[[1]], quote(stat))) {
7179
strip_dots(expr[[2]])

R/bin.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ bin_breaks_width <- function(x_range, width = NULL, center = NULL,
8787
max_x <- x_range[2] + (1 - 1e-08) * width
8888
breaks <- seq(origin, max_x, width)
8989

90-
if (length(breaks) > 1e6) {
90+
if (length(breaks) == 1) {
91+
# In exceptionally rare cases, the above can fail and produce only a
92+
# single break (see issue #3606). We fix this by adding a second break.
93+
breaks <- c(breaks, breaks + width)
94+
} else if (length(breaks) > 1e6) {
9195
stop("The number of histogram bins must be less than 1,000,000.\nDid you make `binwidth` too small?", call. = FALSE)
9296
}
9397

R/geom-dotplot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#' @inheritParams geom_point
3535
#' @param stackdir which direction to stack the dots. "up" (default),
3636
#' "down", "center", "centerwhole" (centered, but with dots aligned)
37-
#' @param stackratio how close to stack the dots. Default is 1, where dots just
37+
#' @param stackratio how close to stack the dots. Default is 1, where dots
3838
#' just touch. Use smaller values for closer, overlapping dots.
3939
#' @param dotsize The diameter of the dots relative to `binwidth`, default 1.
4040
#' @param stackgroups should dots be stacked across groups? This has the effect

R/geom-ribbon.r

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
#' h + geom_ribbon(aes(ymin=0, ymax=level))
3131
#' h + geom_area(aes(y = level))
3232
#'
33-
#' # Change orientation be switching the mapping
34-
#' h + geom_area(aes(x = level, y = year))
33+
#' # Orientation cannot be deduced by mapping, so must be given explicitly for
34+
#' # flipped orientation
35+
#' h + geom_area(aes(x = level, y = year), orientation = "y")
3536
#'
3637
#' # Add aesthetic mappings
3738
#' h +

0 commit comments

Comments
 (0)