-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Should alpha
in geoms that have polygons and points only affect the interior of polygons?
#6006
Comments
alpha
in geoms that include polygons and points/lines _only_ affect the fill of polygons?alpha
in geoms that include polygons and points/lines only affect the interior of polygons?
alpha
in geoms that include polygons and points/lines only affect the interior of polygons?alpha
in geoms that include polygons and points only affect the interior of polygons?
alpha
in geoms that include polygons and points only affect the interior of polygons?alpha
in geoms that have polygons and points only affect the interior of polygons?
Thanks for your suggestions David! I'm not sure I agree with the premise that in compound polygon/point layers In In
|
Ahh, I see, thanks @teunbrand Assume there is no enthusiasm for having sub-alpha concepts? So:
It could be hierarchial, so if |
There was some discussion around specialised sub-aesthetics in #5454 (comment). But the TL;DR is: that is fine for extension packages but we didn't want to set this as a precedent in ggplot2. |
Awesome, thanks for the TLDR. Thought you guys had already considered it somewhere. Yeah, that makes sense. Definitely want to keep the complexity manageable |
alpha
in ggplot2 for geoms that have polygons and points affects any polygon interiors and points.This only affects
geom_boxplot
andgeom_sf
(to my knowledge).Conceptually, points and lines are generally treated consistently in ggplot2, apart from this (that I'm aware of). E.g. in how
colour
is applied to points and lines, or in ingeom_pointrange
wherealpha
affects both point and line.So I think it'd be most intuitive, if in geoms with polygon interiors and points/lines,
alpha
only affected polygon interiors.The most common use-case of the
alpha
argument ingeom_sf
is to affect the fill of polygons. It'd is nice to be able to set this once usingupdate_geom_defaults
. However, you can't do this, if you only want it to only affect polygons and not the points.To fix this:
geom_boxplot
,outlier.alpha = NULL
update to default to NA instead of inheriting fromalpha
geom_sf
, update so that it only affects polygon interiors, regardless of the sf object geometry typeRelated past issues to this were discussed in #1371 and #1523.
Thanks for your consideration, and sorry to bombard with issues :)
Created on 2024-07-18 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: