Repository navigation
annotation_raster()/_custom() respond to scale transformations - #6182
Merged
Merged
Conversation
Collaborator
Author
|
@yutannihilation Since you worked on this problem before (and I'm cannibalising your PR) in #3121, is there any chance I could get you to look this over at some point? No worries if it is inconvenient :) |
yutannihilation
approved these changes
Nov 13, 2024
yutannihilation
left a comment
Member
There was a problem hiding this comment.
Thanks for tackling this! I don't remember well how I struggled with #3121, but this just looks good to me.
AsIs coordinates:
This is cool feature and worth mentioning in NEWS.md. Could you add some words?
Collaborator
Author
|
Of course. Thank you for the review! |
This was referenced Oct 22, 2025
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.
This PR aims to fix #3120 and is incompatible with #3121.
Briefly, it uses the panel parameters to transform the corners of the rectangle used for annotation placement.
To recap some discussion in #3121. The scales should affect the annotation, but not vice versa (i.e., we don't want to train scales on annotations) #3121 (comment). The approach of encoding the corners coordinates as aesthetics did affect the scales, so that approach was unsuitable. Instead it was proposed to keep them as parameters and transform them in the drawing stage #3121 (comment). In addition, it was proposed to have data agnostic placement as well #3121 (comment). #3121 was waiting for #3116 to get implemented, but as this hasn't happened in 5 years, I felt it was time to forge ahead.
This PR implements transformed parameters, so scales are not trained by annotations. In addition, the
I()mechanism (#5477) is used for data agnostic placement of annotations.Some examples; plain annotation:
Reversed x:
AsIs coordinates:
Created on 2024-11-12 with reprex v2.1.1