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

Change default shape behaviour #4739

Closed
iferres opened this issue Feb 22, 2022 · 2 comments
Closed

Change default shape behaviour #4739

iferres opened this issue Feb 22, 2022 · 2 comments

Comments

@iferres
Copy link

iferres commented Feb 22, 2022

ggplot2 includes the update_geom_defaults() and theme_set() functions to override the default behaviour of the package. This is great to (for instance) generate an organizational identity regarding graphics aesthetics. One can easily create a custom theme and apply it to all the graphics without the need to specify it, which saves A LOT of time. Also you can change the default point size, the default font family, etc.

And here's my question: whereas you can provide a default point shape, is it possible to change the default behaviour for generating a shape scale? I noticed that the shape scale is generated by scales::shape_pal(), my question is if I could change my default shapes to 21, 22, 23, 24, and 25 which allow fill and colour aesthetics, without need to provide them through ... + scale_shape_manual(), may be providing an alternative function or a simply a list from where grab the shapes.

An analogous question regarding default colour scales has to be made also 😅
Thank you!

@iferres
Copy link
Author

iferres commented Feb 22, 2022

Suggested interface:

update_scale_defaults(scale = "shape", new =  `function() ...`)
update_scale_defaults(scale = "colour", new =  `function() ...`)
update_scale_defaults(scale = "fill", new =  `function() ...`)

@clauswilke
Copy link
Member

This has been discussed: #2691

It's a useful feature to have, but difficult to implement. This issue would have to be addressed first: #4269.

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

No branches or pull requests

2 participants