-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Documentation of arguments to guide_axis
is unclear
#4958
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
Labels
Comments
See also: #4650 (comment). Where it is suggested, that the primary axis should automatically take the opposite |
I'll incorporate an explicit type and length check for the |
teunbrand
added a commit
to teunbrand/ggplot2
that referenced
this issue
Sep 4, 2022
teunbrand
added a commit
that referenced
this issue
Apr 24, 2023
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).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
order
has to be numeric. However, this is not checked. Passing a character simply gives a warning ("NAs introduced by coercion").order
nor ofposition
.I tried to add a secondary axis on the same side as the primary axis as follows:
This leads to a warning: "Discarding guide on merge. Do you have more than one guide with the same position?" And the secondary axis is not drawn. So it seems that I did not fully understand the use of
order
andposition
yet...The text was updated successfully, but these errors were encountered: