Skip to content

polish news #3209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 87 additions & 52 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,115 @@
# ggplot2 3.1.0.9000

* `geom_rug()` gains a `length` option to allow for changing the length of the rug lines. (@daniel-wells, #3109)
This is a minor release with an emphasis on internal changes to make ggplot2
faster and more consistent. The few interface changes will only affect the
aesthetics of the plot in minor ways, and will only potentially break code of
extension developers if they have relied on internals that have been changed.
This release also sees the addition of Hiroaki Yutani (@yutannihilation) to the
core developer team.

* `coord_sf()` graticule lines are now drawn in the same thickness as
panel grid lines in `coord_cartesian()`, and seting panel grid
lines to `element_blank()` now also works in `coord_sf()`
(@clauswilke, #2991, #2525).

* ggplot2 no longer attaches any external packages when using functions that depend on
packages that are suggested but not imported by ggplot2. The affected functions
include `geom_hex()`, `stat_binhex()`, `stat_summary_hex()`, `geom_quantile()`,
`stat_quantile()`, and `map_data()` (@clauswilke, #3126).
## New features

* `geom_hline()`, `geom_vline()`, and `geom_abline()` now throw a warning if the user supplies both an `xintercept`, `yintercept`, or `slope` value and a mapping (@RichardJActon, #2950).
* This release includes a range of internal changes that speeds up plot
generation. None of the changes are user facing and will not break any code,
but in general ggplot2 should feel much faster. The changes includes, but are
not limited to:

- Caching ascent and descent dimensions of text to avoid recalculating it for
every title.

* `scale_color_continuous()` now points at `scale_colour_continuos()` so that it
will handle `type = "viridis"` as the documentation states (@hlendway, #3079).
- Using a faster data.frame constructor as well as faster indexing into
data.frames

- emoving the plyr dependency, replacing plyr functions with faster
equivalents.

* `scale_shape_identity()` now works correctly with `guide = "legend"` (@malcolmbarrett, #3029)
* `geom_polygon()` can now draw polygons with holes using the new `subgroup`
aesthetic. This functionality requires R 3.6.0 (@thomasp85, #3128)

* Facet strips on the left side of plots now have clipping turned on, preventing
text from running out of the strip and borders from looking thicker than for
other strips (@karawoo, #2772 and #3061).
* Aesthetic mappings now accept functions that return `NULL` (@yutannihilation,
#2997).

* `coord_map()` now can have axes on the top and right (@karawoo, #3042).
* `stat_function()` now accepts rlang/purrr style anonymous functions for the
`fun` parameter (@dkahle, #3159).

* `geom_rug()` gains an "outside" option to allow for moving the rug tassels to outside the plot area. (@njtierney, #3085)
* `geom_rug()` gains an "outside" option to allow for moving the rug tassels to
outside the plot area (@njtierney, #3085) and a `length` option to allow for
changing the length of the rug lines (@daniel-wells, #3109).

* `geom_rug()` now works with `coord_flip()` (@has2k1, #2987).
## Extensions

* Layers now have a new member function `setup_layer()` which is called at the
very beginning of the plot building process and which has access to the original
input data and the plot object being built. This function allows the creation of
custom layers that autogenerate aesthetic mappings based on the input data or that
filter the input data in some form. One example is the new `LayerSf` class which
locates the geometry column in sf objects and sets up an aesthetic mapping for it
(@clauswilke, #2872).

* Default labels are now generated more consistently; e.g., symbols no longer
get backticks, and long expressions are abbreviated with `...`
(@yutannihilation, #2981).

* Diverging brewer color scale now has the correct mid-point color (@dariyasydykova, #3072).
very beginning of the plot building process and which has access to the
original input data and the plot object being built. This function allows the
creation of custom layers that autogenerate aesthetic mappings based on the
input data or that filter the input data in some form. This is mainly of
interest to extension developers (@clauswilke, #2872).

* Aesthetic mappings now accept functions that return `NULL` (@yutannihilation,
#2997).

* Closed arrows in `element_line()` are now filled (@yutannihilation, #2924).
* `x0` and `y0` are now recognized positional aesthetics so they will get scaled
if used in extension geoms and stats (@thomasp85, #3168)

* ggplot2 now works in Turkish locale (@yutannihilation, #3011).
## Minor improvements and bug fixes

* `GeomRibbon` and `GeomArea` now sort the data along the x-axis in the
`setup_data()` method rather than as part of `draw_group()` (@thomasp85, #3023)
* `coord_map()` now can have axes on the top and right (@karawoo, #3042).

* `coord_sf()`, `coord_map()`, and `coord_polar()` now squash `-Inf` and `Inf`
into the min and max of the plot (@yutannihilation, #2972).

* `stat_bin()` will now error when the number of bins exceeds 1e6 to avoid
accidentally freezing the user session (@thomasp85).
* `coord_sf()` graticule lines are now drawn in the same thickness as panel grid
lines in `coord_cartesian()`, and seting panel grid lines to `element_blank()`
now also works in `coord_sf()`
(@clauswilke, #2991, #2525).

* `stat_bin()` now handles data with only one unique value (@yutannihilation #3047).
* `economics` data has been regenerated. This leads to some changes in the
values of all columns (especially in `psavert`), but more importantly, strips
the grouping attributes from `economics_long`.

* `stat_function()` now accepts rlang/purrr style anonymous functions for the
`fun` parameter (@dkahle, #3159).
* `element_line()` now fills closed arrows (@yutannihilation, #2924).

* `geom_polygon()` can now draw polygons with holes using the new `subgroup`
aesthetic. This functionality requires R 3.6 (@thomasp85, #3128)
* Facet strips on the left side of plots now have clipping turned on, preventing
text from running out of the strip and borders from looking thicker than for
other strips (@karawoo, #2772 and #3061).

* `x0` and `y0` is now recognized positional aesthetics so they will get scaled
if used in extension geoms and stats (@thomasp85, #3168)
* ggplot2 now works in Turkish locale (@yutannihilation, #3011).

* ggplot2 no longer attaches any external packages when using functions that
depend on packages that are suggested but not imported by ggplot2. The
affected functions include `geom_hex()`, `stat_binhex()`,
`stat_summary_hex()`, `geom_quantile()`, `stat_quantile()`, and `map_data()`
(@clauswilke, #3126).

* `geom_area()` and `geom_ribbon()` now sort the data along the x-axis in the
`setup_data()` method rather than as part of `draw_group()` (@thomasp85,
#3023)

* Re-generate economics data. This leads to some changes in the values of all
columns (especially in `psavert`), but more importantly, strips the grouping
attributes from `economics_long`.
* `geom_hline()`, `geom_vline()`, and `geom_abline()` now throw a warning if the
user supplies both an `xintercept`, `yintercept`, or `slope` value and a
mapping (@RichardJActon, #2950).

* `geom_rug()` now works with `coord_flip()` (@has2k1, #2987).

* Default labels are now generated more consistently; e.g., symbols no longer
get backticks, and long expressions are abbreviated with `...`
(@yutannihilation, #2981).

* All-`Inf` layers are now ignored for picking the scale (@yutannihilation,
#3184).

* Diverging Brewer colour palette now use the correct mid-point colour
(@dariyasydykova, #3072).

* `scale_color_continuous()` now points to `scale_colour_continuous()` so that
it will handle `type = "viridis"` as the documentation states (@hlendway,
#3079).

* `scale_shape_identity()` now works correctly with `guide = "legend"`
(@malcolmbarrett, #3029)

* `stat_bin()` will now error when the number of bins exceeds 1e6 to avoid
accidentally freezing the user session (@thomasp85).

* All-`Inf` layers are now ignored for picking the scale (@yutannihilation, #3184).
* `stat_bin()` now handles data with only one unique value (@yutannihilation
#3047).

# ggplot2 3.1.0

Expand Down