Skip to content

Making copies of trained position scales #6286

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

Merged
merged 7 commits into from
Mar 25, 2025

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #3441.

Briefly, it adds a freeze() method to viewscales, that makes a pre-populated, untrainable copy of a position scale.
This is more of a extension development hook so it isn't meaningfully exposed to users.

@thomasp85
Copy link
Member

I'm not sure I'm a fan of the method name - it feels very un-ggplot2 to invoke physical phenomena

@teunbrand
Copy link
Collaborator Author

I'm happy to entertain alternatives. To offer a few: make_fixed_copy(), copy_fixed(), make_immutable(), replicate(), imitate()?

@thomasp85
Copy link
Member

let's go with the first

Merge branch 'main' into copy_scale

# Conflicts:
#	tests/testthat/test-scales.R
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand teunbrand merged commit 56c20f6 into tidyverse:main Mar 25, 2025
10 of 11 checks passed
@teunbrand teunbrand deleted the copy_scale branch March 25, 2025 12:47
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.

Feature request: enable making copies of trained position scales
2 participants