Skip to content

Commit

Permalink
Enable parallel_projection as a kwarg (#1535)
Browse files Browse the repository at this point in the history
Signed-off-by: paul.profizi <[email protected]>
  • Loading branch information
PProfizi authored Apr 26, 2024
1 parent ae7e203 commit 8a44c9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/06-plotting/00-basic_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
screenshot="model_plot.png",
title="Model",
text="Model plot off",
parallel_projection=True
)

# Notes:
Expand Down
2 changes: 2 additions & 0 deletions src/ansys/dpf/core/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def __init__(self, **kwargs):
kwargs_in = _sort_supported_kwargs(bound_method=pv.Plotter.__init__, **kwargs)
# Initiate pyvista Plotter
self._plotter = pv.Plotter(**kwargs_in)
if kwargs.pop("parallel_projection", False):
self._plotter.parallel_projection = True

def add_scale_factor_legend(self, scale_factor, **kwargs):
kwargs_in = _sort_supported_kwargs(bound_method=self._plotter.add_text, **kwargs)
Expand Down

0 comments on commit 8a44c9c

Please sign in to comment.