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

POC: Standardise width calculation #6065

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Aug 28, 2024

This PR aims to fix #2800.

Briefly; it adds a helper function to standardise computing widths and applies it to several geoms that compute it.

There are several problems with the current situation;

  1. Some geoms have width as an aesthetic, some have width as a parameter.
  2. The Geom$default_aes$width is a 'dummy' default which was never actually used.

Respecitvely, this PR solves these thus:

  1. All width is implemented as aesthetic.
  2. The Geom$default_aes$width is used as a multiplier after calculating the data resolution. It replaces hardcoded defaults.

As a caveat; I didn't treat GeomErrorbarh in this PR, but that is because I think it should be deprecated (#5961). For this reason I still treat this as POC.

@teunbrand teunbrand changed the title Standardise width calculation POC: Standardise width calculation Aug 28, 2024
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.

default width aesthetic of geom_errorbar does not impact plot
1 participant