-
Notifications
You must be signed in to change notification settings - Fork 25
Add structure_3d_plotly
#214
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
Merged
Merged
Conversation
This file contains 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
…site_label, generate_subplot_title, add_site_to_plot, get_structures for reuse in structure_2d and structure_(2d|3d)_plotly maybe structure_2d (mpl version) too
…plotly.svg to readme update matbench-phonons-structures-2d-plotly.svg with image atoms
FAILED tests/structure_viz/test_plotly.py::test_structure_2d_plotly[kwargs0] - AttributeError: attr='specie' not found on PeriodicSite. Did you mean... for idx, (_key, struct) in enumerate(struct_dict.items(), start=1): > assert fig.layout.annotations[idx - 1].text == f"{idx} - {struct.formula}" E AssertionError: assert 'struct1 - Fe1 O1' == '1 - Fe1 O1' E E - 1 - Fe1 O1 E + struct1 - Fe1 O1 E ? ++++++ tests/structure_viz/test_plotly.py:190: Assertion
… of an array with more than one element is ambiguous. Use a.any() or a.all()
janosh
added a commit
that referenced
this pull request
Mar 28, 2025
* 1st swing at structure_3d_plotly * extract helper functions get_elem_colors, get_atomic_radii, generate_site_label, generate_subplot_title, add_site_to_plot, get_structures for reuse in structure_2d and structure_(2d|3d)_plotly maybe structure_2d (mpl version) too * split pymatviz/structure_viz.py module into plotly, mpl and helpers submodules * split test_structure_viz.py into test_helpers.py, test_mpl.py, test_plotly.py * add structure_3d_plotly example asset matbench-phonons-structures-3d-plotly.svg to readme update matbench-phonons-structures-2d-plotly.svg with image atoms * fix tests * add tests for structure_3d_plotly
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.
for quick and dirty yet interactive, pan and zoomable 3d structures that just get the job done when doing exploratory data analysis
SVG compression seems to have corrupted the example asset: