
Scale_x_continuous() and scale_y_continuous() can now display a secondary axis that is a one-to-one transformation of the primary axis (e.g. right modifiers to axis.text.* and axis.title.*. The themes of top and right axes can be modified using the. The position of x and y axes can now be changed using the position argument in scale_x_*and scale_y_* which can take top and bottom, and left and right respectively.This problem has been fixed, but requires re-installation of all extension packages. Unfortunately there was a major oversight in the construction of ggproto which lead to extensions capturing the super object at package build time, instead of at package run time (#1826). The theme option panel.margin has been deprecated in favour of panel.spacing to more clearly communicate intent. The relative order of panel, strip, and axis can now be controlled with the theme setting acement that takes either inside (strip between panel and axis) or outside (strip after axis). Strips can now be freely positioned in facet_wrap() using the strip.position argument (deprecates switch). When facet_wrap() results in an uneven number of panels, axes will now be drawn underneath the hanging panels (fixes #1607) We have also added the following new fatures.įacet_grid() and facet_wrap() now allow expressions in their facetting formulas ( #1596). Facets are now extendable in the same manner as geoms and stats, as described in vignette("extending-ggplot2"). The facet system, as well as the internal panel class, has been rewritten in ggproto.

Compared to the previous version, this is stricter for aesthetics (previously there was no message), and less strict for parameters (previously this threw an error) (#1585). When creating a layer, ggplot2 will warn if you use an unknown aesthetic or an unknown parameter. Examples and references in other functions were updated to demonstrate geom_col() usage. It does not support any other stat_() and does not provide fallback support for the binwidth parameter.

Geom_col() was added to complement geom_bar() ( It uses stat="identity" by default, making the y aesthetic mandatory. Position_stack() and position_fill() gain a vjust argument which makes it easy to (e.g.) display labels in the middle of stacked bars (#1821). Position_stack() and position_fill() now accepts negative values which will create stacks extending below the x-axis (#1691). If you want the opposite order (useful if you have horizontal bars and horizontal legend), you can request reverse stacking by using position = position_stack(reverse = TRUE) (#1837). This allows you to control the order through grouping, and ensures that the default legend matches the plot (#1552, #1593).

Position_stack() and position_fill() now sort the stacking order to match grouping order. The main plot title is now left-aligned to better work better with a subtitle.

You can control their appearance with the theme settings plot.caption and plot.subtitle. Thanks to plots now have subtitles and captions, which can be set with the subtitle and caption arguments to ggtitle() and labs(). Ggplot2 2.2.0 Major new features Subtitle and caption
