Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/4025.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: adapt new visualizer version
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ all = [

tests = [
"ansys-dpf-core[graphics]==0.13.6",
"ansys-tools-visualization-interface==0.9.2",
"ansys-tools-visualization-interface==0.10.0",
"autopep8==2.3.2",
"matplotlib==3.10.3",
"pandas==2.3.0",
Expand All @@ -86,7 +86,7 @@ doc = [
"ansys-dpf-core[graphics]==0.13.6",
"ansys-mapdl-reader==0.55.1",
"ansys-sphinx-theme==1.5.2",
"ansys-tools-visualization-interface==0.9.2",
"ansys-tools-visualization-interface==0.10.0",
"grpcio==1.73.0",
"imageio-ffmpeg==0.6.0",
"imageio==2.37.0",
Expand Down
22 changes: 11 additions & 11 deletions src/ansys/mapdl/core/mapdl_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def kplot(
"the database."
)
pl.plot([], [], [], **kwargs)
return pl.show(**kwargs)
return pl.show()

keypoints = self.geometry.get_keypoints(return_as_array=True)
points = [{"points": keypoints}]
Expand All @@ -488,7 +488,7 @@ def kplot(
{"points": keypoints, "labels": self.geometry.knum.astype(int)}
)
pl.plot([], points, labels, **kwargs)
return pl.show(**kwargs)
return pl.show()

# otherwise, use the legacy plotter
if graphics_backend is GraphicsBackend.MAPDL:
Expand Down Expand Up @@ -568,7 +568,7 @@ def lplot(
)
pl = MapdlPlotter()
pl.plot([], [], [], **kwargs)
return pl.show(**kwargs)
return pl.show()

lines = self.geometry.get_lines(return_as_list=True)
meshes = []
Expand Down Expand Up @@ -626,7 +626,7 @@ def lplot(
)
pl = MapdlPlotter()
pl.plot(meshes, [], labels, **kwargs)
return pl.show(**kwargs)
return pl.show()
else:
with self._enable_interactive_plotting():
return super().lplot(nl1=nl1, nl2=nl2, ninc=ninc, **kwargs)
Expand Down Expand Up @@ -754,7 +754,7 @@ def aplot(
)
pl = MapdlPlotter()
pl.plot([], [], [], **kwargs)
return pl.show(**kwargs)
return pl.show()

surfs = self.geometry.get_areas(return_as_list=True, quality=quality)
meshes = []
Expand Down Expand Up @@ -859,7 +859,7 @@ def aplot(
)
pl = MapdlPlotter()
pl.plot(meshes, [], labels, **kwargs)
return pl.show(**kwargs)
return pl.show()
if graphics_backend is GraphicsBackend.MAPDL:
with self._enable_interactive_plotting():
return super().aplot(
Expand Down Expand Up @@ -953,7 +953,7 @@ def vplot(
)
pl = MapdlPlotter()
pl.plot([], [], [], **kwargs)
return pl.show(**kwargs)
return pl.show()

# Storing entities selection
with self.save_selection:
Expand Down Expand Up @@ -1132,7 +1132,7 @@ def nplot(self, nnum="", *, graphics_backend=None, **kwargs):
if not self.mesh.n_node:
warnings.warn("There are no nodes to plot.")
pl.plot([], [], [], **kwargs)
return pl.show(**kwargs)
return pl.show()

labels = []
if nnum:
Expand All @@ -1146,7 +1146,7 @@ def nplot(self, nnum="", *, graphics_backend=None, **kwargs):
]
points = [{"points": self.mesh.nodes}]
pl.plot([], points, labels, mapdl=self, **kwargs)
return pl.show(**kwargs)
return pl.show()

elif graphics_backend is GraphicsBackend.MAPDL:
# otherwise, use the built-in nplot
Expand Down Expand Up @@ -1269,7 +1269,7 @@ def eplot(self, show_node_numbering=False, *, graphics_backend=None, **kwargs):
if not self._mesh.n_elem:
warnings.warn("There are no elements to plot.")
pl.plot([], [], [], mapdl=self, **kwargs)
return pl.show(**kwargs)
return pl.show()

# TODO: Consider caching the surface
esurf = self.mesh._grid.linear_copy().extract_surface().clean()
Expand All @@ -1292,7 +1292,7 @@ def eplot(self, show_node_numbering=False, *, graphics_backend=None, **kwargs):
mapdl=self,
**kwargs,
)
return pl.show(**kwargs)
return pl.show()
elif graphics_backend is GraphicsBackend.MAPDL:
# otherwise, use MAPDL plotter
with self._enable_interactive_plotting():
Expand Down
3 changes: 1 addition & 2 deletions src/ansys/mapdl/core/plotting/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ def show(
auto_close=False,
window_size=window_size,
screenshot=savefig,
**kwargs,
)
self.scene.screenshot(self._savefig)

Expand All @@ -877,7 +876,7 @@ def show(

else:
if not return_plotter:
self._backend.show(**kwargs)
self._backend.show()

if return_plotter:
return self
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/mapdl/core/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def _plot_point_scalars(self, scalars, show_node_numbering=False, **kwargs):
pl = MapdlPlotter()
pl.plot(meshes, [], labels, mapdl=self, **kwargs)

return pl.show(**kwargs)
return pl.show()

@requires_package("ansys.tools.visualization_interface")
def _plot_cell_scalars(self, scalars, show_elem_numbering=False, **kwargs):
Expand Down Expand Up @@ -756,7 +756,7 @@ def _plot_cell_scalars(self, scalars, show_elem_numbering=False, **kwargs):
]
pl = MapdlPlotter()
pl.plot(meshes, [], labels, mapdl=self, **kwargs)
return pl.show(**kwargs)
return pl.show()

@property
@supress_logging
Expand Down
Loading