Skip to content

Improve scales documentation #3291

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

Closed
paleolimbot opened this issue May 2, 2019 · 3 comments
Closed

Improve scales documentation #3291

paleolimbot opened this issue May 2, 2019 · 3 comments
Labels
documentation tidy-dev-day 🤓 Tidyverse Developer Day

Comments

@paleolimbot
Copy link
Member

There are several opportunities to improve the documentation for scale-related functions, including scale_(x|y)_continuous(), scale_(x|y)_discrete(), scale_*_gradient(), and scale_*_brewer(). This is a documentation issue intended for the tidyverse dev day (#3267).

  • In scale_*_gradient(), it may be worth mentioning that passing na.value = NA is useful when used with the fill aesthetic (fill = NA results in no fill), but will not work for the colour aesthetic.

  • In scale_*_gradient(), the behaviour of midpoint when a trans is applied should be documented (depends on resolution of midpoint is not transformed in scale_color_gradient2 #3198).

  • The current documentation describes scales::censor, which may be worth linking to. scales::squish and scales::squish_infinite can be used here as well, which is not obvious from either the ggplot2 or scales documentation.

  • The parameter documentation for sec.axis in scale_continuous should link to sec_axis() (and possibly be removed from the "see also" section).

  • The links to scales::rescale() aren't active on the site, and it isn't obvious that rescale() isn't a function in ggplot2 (from several scale-related documentation pages).

  • It's worth mentioning that the "Palettes" section in scale_*_brewer() refers to the palette argument (and mention that there is a "Palettes" section in the argument documentation for palette). I know this seems obvious but I've answered this question a few times in tutorials.

  • I'm not sure we need to demonstrate how to change scale label in the examples section for scale_*_brewer(), or the appearance of various scales on a dark background.

  • In scale_(x|y)continuous() there is a link to lims() and labs(), but in scale_(x|y)discrete() there is not.

These are only suggestions, feel free to add to/debate!

@hadley
Copy link
Member

hadley commented May 3, 2019

Could you please break this up in to smaller issues? Ideally we want to have multiple smaller issues that people can work on independently, so breaking up by scale is probably a good approach.

@paleolimbot
Copy link
Member Author

Done! (#3298, #3299, #3300, #3301)

@lock
Copy link

lock bot commented Oct 30, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation tidy-dev-day 🤓 Tidyverse Developer Day
Projects
None yet
Development

No branches or pull requests

2 participants