Skip to content
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

Fixing documentation in binned_scale suggesting it defaults to oob = censor #5691

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

joshhwuu
Copy link
Contributor

Attempting to resolve issue #5655

@teunbrand
Copy link
Collaborator

Hi there, thanks for putting together a PR. The documentation is generated from the .R files, so the appropriate place to make edits is here:

ggplot2/R/scale-.R

Lines 249 to 266 in a4be39d

#' Binning scale constructor
#'
#' @export
#' @inheritParams continuous_scale
#' @param n.breaks The number of break points to create if breaks are not given
#' directly.
#' @param nice.breaks Logical. Should breaks be attempted placed at nice values
#' instead of exactly evenly spaced between the limits. If `TRUE` (default)
#' the scale will ask the transformation object to create breaks, and this
#' may result in a different number of breaks than requested. Ignored if
#' breaks are given explicitly.
#' @param right Should the intervals be closed on the right (`TRUE`, default) or
#' should the intervals be closed on the left (`FALSE`)? 'Closed on the right'
#' means that values at break positions are part of the lower bin (open on the
#' left), whereas they are part of the upper bin when intervals are closed on
#' the left (open on the right).
#' @param show.limits should the limits of the scale appear as ticks
#' @keywords internal

After such edits have been made, you can use devtools::document() to regenerate the .Rd files.

@joshhwuu
Copy link
Contributor Author

When I was using roxygen2::roxygenise(), it automatically remade the .Rd files for a lot of the R files, including aes_colour_fill_alpha.Rd, position_dodge.Rd, etc. These changes seem to be minimal in every file except man/binned_scale.Rd, man/scale_binned.Rd and man/scale_steps.Rd.

For example, in man/aes_colour_fill_alpha.Rd:

image

It seems that document() simply reordered two of the items so all items are alphabetical, and the same goes for some of the other minimally-changed files.

Should I revert the changes to these minimally-changed documents and then push again or is it okay to leave them in?

@teunbrand
Copy link
Collaborator

The unrelated changes are due to roxygen2 versions and is nothing to worry about. We'll merge in another PR soon that updates these files too, and they shouldn't show up as diffs anymore. I'm going to hold off on merging this PR until release, to avoid conflicts, but I think the PR looks great as-is.

Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the contribution!

@teunbrand teunbrand merged commit e8a388e into tidyverse:main Feb 23, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants