-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add support for ScaleBar
annotation
#13319
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-3.3 #13319 +/- ##
==============================================
+ Coverage 92.44% 92.47% +0.02%
==============================================
Files 317 318 +1
Lines 20264 20339 +75
==============================================
+ Hits 18734 18809 +75
Misses 1530 1530 |
7f728e2
to
a2c9b2d
Compare
a2c9b2d
to
e2e2b8f
Compare
a0e0ba9
to
555284c
Compare
@mattpap is this ready for review, given that geo projections and 2D will be in a different PR? |
Tentatively yes, but I'm still working on multiple issues. |
f9988ff
to
34cab71
Compare
34cab71
to
b21884f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The appearance and zooming look really good.
There are rather a lot of properties of ScaleBar
but I cannot see how to get rid of any of them, and I presume that default values will be fine for most use cases.
Which ones specifically? Many of those properties were "inherited" from |
771c30a
to
30bf020
Compare
None specifically, they all look useful and worth keeping. I was just commenting that there are lots of properties which might make use of ScaleBar intimidating to users. But no action is required on this. |
Amazing thanks so much for implementing this feature! |
* Add support for ScaleBar annotation * Allow to configure axis face * Add support for ArrayBuffer to ImageURL.url * Allow to recompute base_factor and extended_mantissas * Add basic/annotations/scale_bar_image example * Search for officially supported chromium first * Implement vertical orientation layout * Complete implementation of Dimensional models * Finalize bar layout * Improve label/title layout construction * Use min orthogonal sizing for bar/axis * Improve computation of Axis._tick_extent() * Redesign label/title positioning * Add support for pixel bar_length * Add support for exact bar sizing * Add unit and integration tests * Finalize alignment of labels/titles * Add automatic range mode * Move TextLayout under core/layout * Settle on using an axis for bar layout * Refactor construction of text layouts * Fix/improve docstrings * Work around Grid layout's limitations * Improve handling of title in the layout
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
TODO:
two-dimensional scale barsupport geographical projections (maps)Dimensional
modelsDimensional
models configurableadd more predefined units and basesallow bar decorations (e.g. tee head)um
)add more examplesExample:
Note that displaying both a plain bar and an axis is just for the sake of the example and won't be the default.
This incorporates PR #13106.
fixes #11755