-
Notifications
You must be signed in to change notification settings - Fork 23
Fix plot behavior when using keywords screenshot and off_screen #194
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
Conversation
… to pv.Plotter() when it should only be given to pv.show(), just like the "screenshot" kwarg.
…book. Tested with Issue59.ipynb. Linked to Issue59 of PyDPF-Post
Rerunning ci by closing/opening |
ansys/dpf/core/meshed_region.py
Outdated
notebook, | ||
shell_layers, | ||
off_screen, | ||
# off_screen, |
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.
@PProfizi loose of compatibility with potential user scripts ? Is it wanted ?
Codecov Report
@@ Coverage Diff @@
## master #194 +/- ##
==========================================
+ Coverage 85.55% 85.77% +0.21%
==========================================
Files 52 52
Lines 5650 5700 +50
==========================================
+ Hits 4834 4889 +55
+ Misses 816 811 -5 |
…t(field_container)
…ifferent fields on the same mesh. MeshedRegion.grid has to set active scalar field to None.
All plotting has been moved to the new DpfPlotter for 3D plotting. Example for basic_plotting is working. |
# Conflicts: # ansys/dpf/core/plotter.py
…he grid getter level was too harsh. It was needed for add_node_labels
…ple possible backends) and rename _InternalPlotter to _PyVistaPlotter.
Test plot_contour_with_vtk is deprecated and only tested for legacy Plotter.
…chart is not implemented yet for DpfPlotter.
… DpfPlotter, as plot_contour is necessary. Limit this PR to fixing keywords, not changing signatures or global behavior.
Issue #193
Fixed the behavior to have what would be expected.
Still have to add tests, update the docstrings (some arguments are now kwargs), and update the examples.
PS: I have modified the Plotter class, while work is underway to deprecate this and use DpfPlotter instead. This behavior should be copied when migrating plot_contour to the DpfPlotter.
PPS: when initializing a Plotter directly and then calling plot_contour from it, the off_screen keyword must be given when creating the Plotter as it will be an attribute of this Plotter instance, whereas the screenshot keyword should be given to plot_contour (which is logical but should be explained).