NEWS.md
Changes relate to new functionality in ggplot2 3.3 and new functions to apply gglaplot style to plotly plots. The package now depends on ggplot2 v3.3.
%>%
it into ggla_plotly_settings()
. This adjust the plotly layout
, style
and config
settings. Each of these can applied seperately (and adjusted with addtional arguments) with ggla_plotly_layout()
, ggla_plotly_style()
and ggla_plotly_config()
. (#23)left_align_labs()
is being deprecated. The functionality to fully left align titles, subtitles and captions is now included in theme_gla()
. Left aligning the legend is an open issue in ggplot2 which will be resolved in v3.4.y_label_length
in theme_gla()
. (#21)theme_gla()
now includes a boolean arguement free_y_facets
. This should be used for faceted plots with free scales on the y axis. This changes the position of the y-axis labelsThe majority of the changes relate to updates to the underlying style guide, further details and advice can be found here, and updates to ggplot2. The package now depends on ggplot2 v3.2.
theme_gla()
gla_theme
now accepts “default” and “inverse” instead of “light” and “dark” to avoid confusion with the new “light” and “dark” palettes. If “light” or “dark” are used they’ll be changed to the appropriate new value. The default value of this parameter is now “default”.get_theme_colours()
The colours (both names and values) have been changed to match the new version of the style guide. See gla_colours
, gla_default
and gla_inverse
for all the details of the new colours used by the themes and palettes.
The available palettes and the colours underlying them have changed, which has necessitated some changes in the gla_pal()
function.
gla_theme
now accepts “default” and “inverse”. If “light” or “dark” are used they’ll be changed to the appropriate new value and a warning given.palette_name
now accepts “core”, “light”, “dark” and “brand”.main_colours
remains largely unchanged apart from changes to the underlying colours. If no colours are provided the palettes are returned in their default ordering. If more colours are provided than are asked for (by n
) then only the first n
will be returned. If fewer than n
are provided, additional colours will be added in the default order. If green and LDN pink are used together a warning is returned as these colours are not easily distinguishable.n
should always be the number of colours you want returned. For all palettes except “highlight” this should be a single integer. For “highlight” palettes it should be a vector of 2 integers, the first number of categories you want highlighted, and the second the number of context categories. For “diverging” palettes n
must be odd or even depending on the combination of inc0
and remove_margin
, a warning will be given and n
adjusted upwards if needed,remove_margin
has been added for diverging and quantitative palettes. Can be used to remove the edges of palettes if they are too light or dark. Can be set to “left”, “right”, “both” or NULL
(the default). Will remove 1 colour from the appropriate end(s) of the palette, still returning n
colours in total.muted
has been removed as a paramter - similar palettes can now be accessed by specifying palette_name = "dark"
.gla_pal()
now uses the chroma
function interp_scale
instead of grDevices::colorRampPalette
. The original chroma
package is available from github here and is designed to emulate the chroma.js javascript library. gglaplot
uses a forked version of this repo that includes the option to correct the lightness scale of a palette. This version will be installed automatically when the package is updated/installed.
ggla_highlight()
gla_default
unless gla_inverse
has been set using theme_set()
blue_core
as its default colour. *ggla_line()
blue_core
as its default colour.ggla_sf()
geom_sf()
a lot easier.blue_core
as the default colour for point and line geometries.mid point
colour as the default fill for polygonsbackground
as the default colour (used for polygon outlines).gla_default
unless gla_inverse
has been set using theme_set()
gla_theme
as a parameter (set to “default”" as default)
ggla_axis_at_0()
ggla_donut()
ggla_highlightarea()
ggla_horizbar()
ggla_labelline()
GeomGLALine
for use with ggla_line()
(set as default).GeomGLATextHighlight
for use with ggla_highlight()
when adding labels (existing GeomGLAPointHighlight
set as default). Should be specified with geom = GeomGLATextHighlight
.GeomGLAAnnotate
for use with ggplot2::annotate()
. Should be specified with geom = GeomGLAAnnotate
.GeomGLASf
for use with ggla_sf()
(set as default).