New Scale syntax and implementation#82
Draft
thomasp85 wants to merge 74 commits intoposit-dev:mainfrom
Draft
Conversation
teunbrand
reviewed
Jan 22, 2026
Collaborator
teunbrand
left a comment
There was a problem hiding this comment.
There is currently a bit of mixed used between input/output range and domain. It'd be good if we were consistent about this. I find 'domain' more confusing than output range.
What should we do about the legacy scales?
Are scale transformations handled at the writer?
Collaborator
Author
|
There is no such thing as "legacy scales" during this cycle. Everything will be updated to the new architecture (don't know if that was what you meant). As for transformations that is still undecided. Hopefully it will happen before the writer, using polars |
This was referenced Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #16
This PR implements the discussed scale syntax which is roughly (for now)
TYPEcan be one of:CONTINUOUSDISCRETEBINNEDDATEDATETIMEand will be inferred from the data if missing. Not all data can be scaled with all types and will result in an error if attempted.
Valid params is at least:
oob: How should values outside the range be handledexpand: How/if should the guide expand outside the given rangeStill undecided is the fate of guides. Should they be a
SETTINGsetting in which case breaks also end up there, or should guide expand to its own clause with more possibilitiesTODO:
TYPErangenullin continuous range to let either end be determined from data, e.g.FROM [0, null]to set the lower end to zero and the upper end to the maximum value in the mapped dataaesthetic+TYPE