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
Allow for unset dimension or unset excitation when displaying objects. #640
Conversation
…/magpylib into current-line-and-arrow-styling
…ent-line-and-arrow-styling
…agpylib/magpylib into collection-description
…agpylib/magpylib into collection-description
…ection-description
Codecov Report
@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 98.97% 99.20% +0.22%
==========================================
Files 55 55
Lines 6960 7000 +40
==========================================
+ Hits 6889 6944 +55
+ Misses 71 56 -15
|
When objects have been initialized without dimension plotly displays them nicely. Pyvista is hardly visible (also all dots seem to have the same color) and matpltlotlib not at all. |
Should work now, thanks for reviewing. It took a bit more work in the end. I also refactored some dimension and excitations checks since it is part of the topic import magpylib as magpy
for backend in magpy.SUPPORTED_PLOTTING_BACKENDS:
c=magpy.magnet.Cuboid().move([(1.5 * i, j, 0) for j in range(10)], start=0)
magpy.show(*objs, layout_height=600, zoom=1, backend=backend) |
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.
looking good :)
fyi, pyvista does not support different symbols, hence the square instead of circle like in mpl or plotly |
Related Issues
Notes
This PR allows to display objects that have no set dimension or vertices, or no set excitation.
Note that the
TriangularMesh
class cannot be initialized without setting vertices and faces, yet (see #641).Examples