diff --git a/examples/06-plotting/07-plot_on_geometries.py b/examples/06-plotting/07-plot_on_geometries.py index 300d4022af8..0a934e8e8d2 100644 --- a/examples/06-plotting/07-plot_on_geometries.py +++ b/examples/06-plotting/07-plot_on_geometries.py @@ -81,7 +81,7 @@ ############################################################################### # Show points together with the mesh -points.plot(mesh, cpos=cpos) +points.plot(mesh, cpos=cpos, point_size=15, color="blue") ############################################################################### # Create line passing through the geometry's diagonal: @@ -89,7 +89,7 @@ ############################################################################### # Show line with the 3D mesh -line.plot(mesh, cpos=cpos) +line.plot(mesh, cpos=cpos, color="black") ############################################################################### # Create vertical plane passing through the mid point: @@ -104,7 +104,7 @@ ############################################################################### # Show plane with the 3D mesh -plane.plot(mesh, cpos=cpos) +plane.plot(mesh, cpos=cpos, color="red") ############################################################################### # Map displacement field to geometry objects diff --git a/src/ansys/dpf/core/geometry.py b/src/ansys/dpf/core/geometry.py index a2a328a8180..0dfd662bee1 100644 --- a/src/ansys/dpf/core/geometry.py +++ b/src/ansys/dpf/core/geometry.py @@ -115,7 +115,7 @@ def plot(self, mesh=None, **kwargs): """Visualize Points object. If provided, ``mesh`` will be also plotted.""" cpos = kwargs.pop("cpos", None) pl = DpfPlotter(**kwargs) - pl.add_points(self._coordinates.data, render_points_as_spheres=True, point_size=10) + pl.add_points(self._coordinates.data, render_points_as_spheres=True, **kwargs) if mesh: pl.add_mesh(mesh, style="surface", show_edges=True, color="w", opacity=0.3) pl.show_figure(show_axes=True, cpos=cpos) @@ -246,7 +246,7 @@ def plot(self, mesh=None, **kwargs): # Plot line object pl = DpfPlotter(**kwargs) - pl.add_line(self._coordinates.data, width=5) + pl.add_line(self._coordinates.data, **kwargs) if mesh: pl.add_mesh(mesh, style="surface", show_edges=True, color="w", opacity=0.3) pl.show_figure(show_axes=True, cpos=cpos) @@ -448,7 +448,7 @@ def plot(self, mesh=None, **kwargs): # Plot plane object pl = DpfPlotter(**kwargs) - pl.add_plane(self) + pl.add_plane(self, **kwargs) if mesh: pl.add_mesh(mesh, style="surface", show_edges=True, color="w", opacity=0.3) pl.show_figure(show_axes=True, cpos=cpos)