You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is an issue I've been pondering: Should theme elements provided to guides inherit from the plot theme? Currently they don't, and I think this causes unexpected behavior.
Example: I'm trying to change the color of the legend title but I'm inadvertently also changing the font size.
I'd be happy to take a stab at this if we agree that the current behavior is sub-optimal. I think the right way to do it is to expand the calc_element() function so it can take as an optional argument an element that would override the theme settings.
The text was updated successfully, but these errors were encountered:
The guide system, as the last remaining chunk of ggplot2, has been rewritten
in ggproto. The axes and legends now inherit from a <Guide> class, which makes
them extensible in the same manner as geoms, stats, facets and coords
(#3329, @teunbrand). In addition, the following changes were made:
* Styling theme parts of the guide now inherit from the plot's theme
(#2728).
* Styling non-theme parts of the guides accept <element> objects, so that
the following is possible: `guide_colourbar(frame = element_rect(...))`.
* Primary axis titles are now placed at the primary guide, so that
`guides(x = guide_axis(position = "top"))` will display the title at the
top by default (#4650).
* Unknown secondary axis guide positions are now inferred as the opposite
of the primary axis guide when the latter has a known `position` (#4650).
* `guide_colourbar()`, `guide_coloursteps()` and `guide_bins()` gain a
`ticks.length` argument.
* In `guide_bins()`, the title no longer arbitrarily becomes offset from
the guide when it has long labels.
* The `order` argument of guides now strictly needs to be a length-1
integer (#4958).
* More informative error for mismatched
`direction`/`theme(legend.direction = ...)` arguments (#4364, #4930).
* `guide_coloursteps()` and `guide_bins()` sort breaks (#5152).
Here is an issue I've been pondering: Should theme elements provided to guides inherit from the plot theme? Currently they don't, and I think this causes unexpected behavior.
Example: I'm trying to change the color of the legend title but I'm inadvertently also changing the font size.
Created on 2018-06-30 by the reprex package (v0.2.0).
I'd be happy to take a stab at this if we agree that the current behavior is sub-optimal. I think the right way to do it is to expand the
calc_element()
function so it can take as an optional argument an element that would override the theme settings.The text was updated successfully, but these errors were encountered: