File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -1516,14 +1516,19 @@ def __call__(self, state):
1516
1516
)
1517
1517
1518
1518
@pyaedt_function_handler ()
1519
- def plot (self , export_image_path = None ):
1519
+ def plot (self , export_image_path = None , show = True ):
1520
1520
"""Plot the current available Data. With `s` key a screenshot is saved in export_image_path or in tempdir.
1521
1521
1522
1522
Parameters
1523
1523
----------
1524
1524
1525
- export_image_path : str
1526
- Path to image to save.
1525
+ export_image_path : str, optional
1526
+ Path to image to save. Default is None
1527
+ show : bool, optional
1528
+ Whether to display the pyvista plot.
1529
+ When False, a :class::pyvista.Plotter object is created
1530
+ and assigned to the pv property so that it can be
1531
+ modified further. Default is True.
1527
1532
1528
1533
Returns
1529
1534
-------
@@ -1645,9 +1650,9 @@ def s_callback(): # pragma: no cover
1645
1650
self .pv .add_key_event ("s" , s_callback )
1646
1651
if export_image_path :
1647
1652
self .pv .show (screenshot = export_image_path , full_screen = True )
1648
- elif self .is_notebook : # pragma: no cover
1653
+ elif show and self .is_notebook : # pragma: no cover
1649
1654
self .pv .show () # pragma: no cover
1650
- else :
1655
+ elif show :
1651
1656
self .pv .show (full_screen = True ) # pragma: no cover
1652
1657
1653
1658
self .image_file = export_image_path
You can’t perform that action at this time.
0 commit comments