Skip to content
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

Geographic north arrow orientation marker #6070

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

banesullivan
Copy link
Member

When plotting geographic scenes, a north arrow is often preferable to the typical right-hand-rule orientation marker.

These changes add a convenience method to add an orientation marker that is a in the style of a tradition geographic north arrow.

I somewhat arbitrarily chose the default color of this and I'm not totally loving it -- would appreciate suggestions for better colors.

import pyvista as pv
from pyvista import examples
terrain = examples.download_st_helens().warp_by_scalar()
pl = pv.Plotter()
pl.add_mesh(terrain, show_scalar_bar=False, cmap='gist_earth')
pl.add_north_arrow_widget()
pl.show()

screenshot

@pyvista-bot pyvista-bot added the enhancement Changes that enhance the library label May 10, 2024
@@ -445,6 +445,64 @@ def create_axes_orientation_box(
return actor


def create_north_arrow():
Copy link
Member Author

Choose a reason for hiding this comment

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

This may be better as an example mesh rather than a tool here

Copy link
Member

Choose a reason for hiding this comment

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

Personally, this looks tool.

Copy link

codecov bot commented May 11, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.96%. Comparing base (06e7a8f) to head (cb27627).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6070   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files         141      141           
  Lines       24532    24551   +19     
=======================================
+ Hits        23788    23807   +19     
  Misses        744      744           

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants