-
Notifications
You must be signed in to change notification settings - Fork 36
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
added option to plot at visual center of fields #94
added option to plot at visual center of fields #94
Conversation
7fbc610
to
3432eea
Compare
@bobmyhill given this is adding a dependency, I might see whether it's simpler to just add the relevant code to |
3432eea
to
0bf081b
Compare
Pull Request Test Coverage Report for Build 6510161844
💛 - Coveralls |
a49dbd5
to
319bdc0
Compare
@morganjwilliams good point, I've added the code with a reference to the original repo and removed the new dependency. I've also added to the test suite. |
Great, thanks @bobmyhill! Will merge it across. |
c3e822b
into
morganjwilliams:develop
Description
This PR adds the option to plot field labels at the "visual center" of a field, rather than the centroid. The "visual center" is defined as the center of the largest inscribed circle. An option is provided to pass a vertical exaggeration, which instead finds the center of the largest inscribed ellipse.
Builds on #96.
Motivation and Context
For fields with reflex boundary vertices ("concave polygons"), the centroid can plot close to a boundary or even outside the field. The "visual center" of a polygon is often a better location for field labels.
@morganjwilliams: I'm not sure whether this is something you want in the code, but I needed it anyway, so thought I'd open the PR.
Types of changes
Checklist: