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

Improve documentation of arguments to xlim/ylim #3701

Closed
jarauh opened this issue Jan 8, 2020 · 0 comments · Fixed by #3768
Closed

Improve documentation of arguments to xlim/ylim #3701

jarauh opened this issue Jan 8, 2020 · 0 comments · Fixed by #3768
Labels
documentation tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@jarauh
Copy link

jarauh commented Jan 8, 2020

Currently, xlim and ylim are documented together with lims. Thus, the argument ... to all three functions is described as:

A name-value pair. The name must be an aesthetic, and the value must be either a length-2 numeric, a character, a factor, or a date/time.

Which is not correct for xlim/ylim.

Suggested text:

For `xlim` and `ylim`: Two numeric values, specifying the left/lower limit and the right/upper limit of the scale. If the larger value comes first, the scale will be reversed. You can leave one value as NA to compute from the range of the data.

For `lims`: A name-value pair. The name must be an aesthetic, and the value must be either a length-2 numeric, a character, a factor, or a date/time.

A numeric value will create a continuous scale. If the larger value comes first, the scale will be reversed. You can leave one value as NA to compute from the range of the data.

A character or factor value will create a discrete scale.

A date-time value will create a continuous date/time scale.

Alternative would be to move some of this to the details section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants