diff --git a/doc/source/API/Application.rst b/doc/source/API/Application.rst index 32ea2e6da58..87ccb2a90b4 100644 --- a/doc/source/API/Application.rst +++ b/doc/source/API/Application.rst @@ -3,7 +3,7 @@ Application and solvers The PyAEDT API includes classes for different applications available in Ansys Electronics Desktop (AEDT). You must initialize AEDT to get access to all PyAEDT modules and methods. -.. image:: ../Resources/aedt_2.webp +.. image:: ../Resources/aedt_2.png :width: 800 :alt: Ansys Electronics Desktop (AEDT) is a platform that enables true electronics system design. diff --git a/doc/source/API/index.rst b/doc/source/API/index.rst index 143c1f692d9..923dfa7880e 100644 --- a/doc/source/API/index.rst +++ b/doc/source/API/index.rst @@ -15,7 +15,7 @@ and Mechanical solvers for comprehensive multiphysics analysis. Tight integration among these solutions provides unprecedented ease of use for setup and faster resolution of complex simulations for design and optimization. -.. image:: ../Resources/aedt_2.webp +.. image:: ../Resources/aedt_2.png :width: 800 :alt: AEDT Applications :target: https://www.ansys.com/products/electronics diff --git a/doc/source/Getting_started/About.rst b/doc/source/Getting_started/About.rst index be708bbd8ae..5f42b245b34 100644 --- a/doc/source/Getting_started/About.rst +++ b/doc/source/Getting_started/About.rst @@ -26,7 +26,7 @@ and mechanical solvers for comprehensive multiphysics analysis. Tight integration among these solutions provides unprecedented ease of use for setup and faster resolution of complex simulations for design and optimization. -.. image:: ../Resources/aedt_collage.webp +.. image:: ../Resources/aedt_collage.jpg :width: 800 :alt: AEDT Applications :target: https://www.ansys.com/products/electronics diff --git a/doc/source/Getting_started/Installation.rst b/doc/source/Getting_started/Installation.rst index 119f64c4f9d..4c09d638cfa 100644 --- a/doc/source/Getting_started/Installation.rst +++ b/doc/source/Getting_started/Installation.rst @@ -33,13 +33,13 @@ In order to do that you can: Please note that AEDT 2023 R1 and lower requires Python 3.7 wheelhouse while AEDT 2023 R2 and higher requires the Python 3.10 wheelhouse. -.. image:: ../Resources/wheelhouse_installation.webp +.. image:: ../Resources/wheelhouse_installation.png :width: 800 :alt: PyAEDT run script Starting from 2023R2, buttons are available in the Automation Tab as in the example below. -.. image:: ../Resources/toolkits_ribbon.webp +.. image:: ../Resources/toolkits_ribbon.png :width: 800 :alt: PyAEDT toolkit buttons available in AEDT @@ -55,13 +55,13 @@ There are three options: - Open source PyAEDT toolkits. Open source PyAEDT toolkits following the `common library `_ standard. -.. image:: ../Resources/toolkit_manager_1.webp +.. image:: ../Resources/toolkit_manager_1.png :width: 800 :alt: PyAEDT toolkit manager 1 The user can select the AEDT application to install the specific workflow. -.. image:: ../Resources/toolkit_manager_2.webp +.. image:: ../Resources/toolkit_manager_2.png :width: 400 :alt: PyAEDT toolkit manager 2 diff --git a/doc/source/Getting_started/index.rst b/doc/source/Getting_started/index.rst index c3d9701fb71..a981d1a5f83 100644 --- a/doc/source/Getting_started/index.rst +++ b/doc/source/Getting_started/index.rst @@ -72,7 +72,7 @@ and Mechanical solvers for comprehensive multiphysics analysis. Tight integration among these solutions provides unprecedented ease of use for setup and faster resolution of complex simulations for design and optimization. -.. image:: ../Resources/aedt_3.webp +.. image:: ../Resources/aedt_3.png :width: 800 :alt: AEDT Applications :target: https://www.ansys.com/products/electronics diff --git a/doc/source/Resources/Mesh_Operations.png b/doc/source/Resources/Mesh_Operations.png new file mode 100644 index 00000000000..d9cdc8c5f32 Binary files /dev/null and b/doc/source/Resources/Mesh_Operations.png differ diff --git a/doc/source/Resources/Mesh_Operations.webp b/doc/source/Resources/Mesh_Operations.webp deleted file mode 100644 index 7665fa48dfc..00000000000 Binary files a/doc/source/Resources/Mesh_Operations.webp and /dev/null differ diff --git a/doc/source/Resources/Optimetrics_Parametric.png b/doc/source/Resources/Optimetrics_Parametric.png new file mode 100644 index 00000000000..649423afdd5 Binary files /dev/null and b/doc/source/Resources/Optimetrics_Parametric.png differ diff --git a/doc/source/Resources/Optimetrics_Parametric.webp b/doc/source/Resources/Optimetrics_Parametric.webp deleted file mode 100644 index 14db9aa4a29..00000000000 Binary files a/doc/source/Resources/Optimetrics_Parametric.webp and /dev/null differ diff --git a/doc/source/Resources/Setups.png b/doc/source/Resources/Setups.png new file mode 100644 index 00000000000..7e1e0bd91b5 Binary files /dev/null and b/doc/source/Resources/Setups.png differ diff --git a/doc/source/Resources/Setups.webp b/doc/source/Resources/Setups.webp deleted file mode 100644 index 2ca0d13e73a..00000000000 Binary files a/doc/source/Resources/Setups.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_2.png b/doc/source/Resources/aedt_2.png new file mode 100644 index 00000000000..e7213e3e4fe Binary files /dev/null and b/doc/source/Resources/aedt_2.png differ diff --git a/doc/source/Resources/aedt_2.webp b/doc/source/Resources/aedt_2.webp deleted file mode 100644 index 38519ab1544..00000000000 Binary files a/doc/source/Resources/aedt_2.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_3.png b/doc/source/Resources/aedt_3.png new file mode 100644 index 00000000000..f4009cbc3c4 Binary files /dev/null and b/doc/source/Resources/aedt_3.png differ diff --git a/doc/source/Resources/aedt_3.webp b/doc/source/Resources/aedt_3.webp deleted file mode 100644 index c58b0e00590..00000000000 Binary files a/doc/source/Resources/aedt_3.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_box.png b/doc/source/Resources/aedt_box.png new file mode 100644 index 00000000000..26a179e9379 Binary files /dev/null and b/doc/source/Resources/aedt_box.png differ diff --git a/doc/source/Resources/aedt_box.webp b/doc/source/Resources/aedt_box.webp deleted file mode 100644 index ee84e7fc1aa..00000000000 Binary files a/doc/source/Resources/aedt_box.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_collage.jpg b/doc/source/Resources/aedt_collage.jpg new file mode 100644 index 00000000000..9028deeb9fb Binary files /dev/null and b/doc/source/Resources/aedt_collage.jpg differ diff --git a/doc/source/Resources/aedt_collage.webp b/doc/source/Resources/aedt_collage.webp deleted file mode 100644 index 1ead603ae8b..00000000000 Binary files a/doc/source/Resources/aedt_collage.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_first_page.png b/doc/source/Resources/aedt_first_page.png new file mode 100644 index 00000000000..00bbdade57b Binary files /dev/null and b/doc/source/Resources/aedt_first_page.png differ diff --git a/doc/source/Resources/aedt_first_page.webp b/doc/source/Resources/aedt_first_page.webp deleted file mode 100644 index 5642a98c655..00000000000 Binary files a/doc/source/Resources/aedt_first_page.webp and /dev/null differ diff --git a/doc/source/Resources/aedt_variables.png b/doc/source/Resources/aedt_variables.png new file mode 100644 index 00000000000..caa87868d88 Binary files /dev/null and b/doc/source/Resources/aedt_variables.png differ diff --git a/doc/source/Resources/aedt_variables.webp b/doc/source/Resources/aedt_variables.webp deleted file mode 100644 index 5955a5b1175..00000000000 Binary files a/doc/source/Resources/aedt_variables.webp and /dev/null differ diff --git a/doc/source/Resources/objects_operations.gif b/doc/source/Resources/objects_operations.gif index 536420616e7..ab760dfdcfe 100644 Binary files a/doc/source/Resources/objects_operations.gif and b/doc/source/Resources/objects_operations.gif differ diff --git a/doc/source/Resources/pyvista_plot.jpg b/doc/source/Resources/pyvista_plot.jpg new file mode 100644 index 00000000000..dae3cf6c31f Binary files /dev/null and b/doc/source/Resources/pyvista_plot.jpg differ diff --git a/doc/source/Resources/pyvista_plot.webp b/doc/source/Resources/pyvista_plot.webp deleted file mode 100644 index f04a918aa4c..00000000000 Binary files a/doc/source/Resources/pyvista_plot.webp and /dev/null differ diff --git a/doc/source/Resources/sparams.jpg b/doc/source/Resources/sparams.jpg new file mode 100644 index 00000000000..9572acf8151 Binary files /dev/null and b/doc/source/Resources/sparams.jpg differ diff --git a/doc/source/Resources/sparams.webp b/doc/source/Resources/sparams.webp deleted file mode 100644 index 1454ba9055c..00000000000 Binary files a/doc/source/Resources/sparams.webp and /dev/null differ diff --git a/doc/source/Resources/sparams_w_matplotlib.jpg b/doc/source/Resources/sparams_w_matplotlib.jpg new file mode 100644 index 00000000000..4fa2029cbac Binary files /dev/null and b/doc/source/Resources/sparams_w_matplotlib.jpg differ diff --git a/doc/source/Resources/sparams_w_matplotlib.webp b/doc/source/Resources/sparams_w_matplotlib.webp deleted file mode 100644 index e361a436b52..00000000000 Binary files a/doc/source/Resources/sparams_w_matplotlib.webp and /dev/null differ diff --git a/doc/source/Resources/toolkit_manager_1.png b/doc/source/Resources/toolkit_manager_1.png new file mode 100644 index 00000000000..5e093f2f703 Binary files /dev/null and b/doc/source/Resources/toolkit_manager_1.png differ diff --git a/doc/source/Resources/toolkit_manager_1.webp b/doc/source/Resources/toolkit_manager_1.webp deleted file mode 100644 index 14603fabc74..00000000000 Binary files a/doc/source/Resources/toolkit_manager_1.webp and /dev/null differ diff --git a/doc/source/Resources/toolkit_manager_2.png b/doc/source/Resources/toolkit_manager_2.png new file mode 100644 index 00000000000..51993ddc2ab Binary files /dev/null and b/doc/source/Resources/toolkit_manager_2.png differ diff --git a/doc/source/Resources/toolkit_manager_2.webp b/doc/source/Resources/toolkit_manager_2.webp deleted file mode 100644 index d7722304a8c..00000000000 Binary files a/doc/source/Resources/toolkit_manager_2.webp and /dev/null differ diff --git a/doc/source/Resources/toolkits_ribbon.png b/doc/source/Resources/toolkits_ribbon.png new file mode 100644 index 00000000000..8f33f7825f2 Binary files /dev/null and b/doc/source/Resources/toolkits_ribbon.png differ diff --git a/doc/source/Resources/toolkits_ribbon.webp b/doc/source/Resources/toolkits_ribbon.webp deleted file mode 100644 index 2a7fe214a02..00000000000 Binary files a/doc/source/Resources/toolkits_ribbon.webp and /dev/null differ diff --git a/doc/source/Resources/variables_advanced.png b/doc/source/Resources/variables_advanced.png new file mode 100644 index 00000000000..4812b016a4d Binary files /dev/null and b/doc/source/Resources/variables_advanced.png differ diff --git a/doc/source/Resources/variables_advanced.webp b/doc/source/Resources/variables_advanced.webp deleted file mode 100644 index 5bc66a5ea07..00000000000 Binary files a/doc/source/Resources/variables_advanced.webp and /dev/null differ diff --git a/doc/source/Resources/wheelhouse_installation.png b/doc/source/Resources/wheelhouse_installation.png new file mode 100644 index 00000000000..4d5e67076a6 Binary files /dev/null and b/doc/source/Resources/wheelhouse_installation.png differ diff --git a/doc/source/Resources/wheelhouse_installation.webp b/doc/source/Resources/wheelhouse_installation.webp deleted file mode 100644 index 74e9de7ccda..00000000000 Binary files a/doc/source/Resources/wheelhouse_installation.webp and /dev/null differ diff --git a/doc/source/User_guide/intro.rst b/doc/source/User_guide/intro.rst index 90313db93d7..0541b24809f 100644 --- a/doc/source/User_guide/intro.rst +++ b/doc/source/User_guide/intro.rst @@ -17,7 +17,7 @@ You can initiate AEDT in non-graphical mode from Python using this code: The preceding code launches AEDT and initializes a new Circuit design. -.. image:: ../Resources/aedt_first_page.webp +.. image:: ../Resources/aedt_first_page.png :width: 800 :alt: AEDT launched diff --git a/doc/source/User_guide/mesh.rst b/doc/source/User_guide/mesh.rst index 4ab26ab3ccd..73a48403343 100644 --- a/doc/source/User_guide/mesh.rst +++ b/doc/source/User_guide/mesh.rst @@ -16,7 +16,7 @@ All mesh operations are conveniently listed within the mesh object: my_mesh_op.update() -.. image:: ../Resources/Mesh_Operations.webp +.. image:: ../Resources/Mesh_Operations.png :width: 800 :alt: Mesh object List diff --git a/doc/source/User_guide/modeler.rst b/doc/source/User_guide/modeler.rst index 264bf77d66b..e6d58daee23 100644 --- a/doc/source/User_guide/modeler.rst +++ b/doc/source/User_guide/modeler.rst @@ -18,7 +18,7 @@ The following code creates a box and changes the color to red: -.. image:: ../Resources/aedt_box.webp +.. image:: ../Resources/aedt_box.png :width: 800 :alt: Modeler Object diff --git a/doc/source/User_guide/postprocessing.rst b/doc/source/User_guide/postprocessing.rst index d1afd8be9aa..3903a48a8b0 100644 --- a/doc/source/User_guide/postprocessing.rst +++ b/doc/source/User_guide/postprocessing.rst @@ -15,7 +15,7 @@ To use PyAEDT to create a report in AEDT, you can follow this general structure: hfss.post.create_report(["db(S11)", "db(S12)"]) -.. image:: ../Resources/sparams.webp +.. image:: ../Resources/sparams.jpg :width: 800 :alt: AEDT report @@ -34,7 +34,7 @@ You can also generate reports in Matplotlib: plt = solution.plot(solution.expressions) # Matplotlib axes object. -.. image:: ../Resources/sparams_w_matplotlib.webp +.. image:: ../Resources/sparams_w_matplotlib.jpg :width: 800 :alt: S-Parameters report created with Matplotlib @@ -97,7 +97,7 @@ PyAEDT leverages PyVista to export and plot fields outside AEDT, generating imag ) -.. image:: ../Resources/pyvista_plot.webp +.. image:: ../Resources/pyvista_plot.jpg :width: 800 :alt: Postprocessing features diff --git a/doc/source/User_guide/setup.rst b/doc/source/User_guide/setup.rst index affd2b6805f..0b9c0f32c70 100644 --- a/doc/source/User_guide/setup.rst +++ b/doc/source/User_guide/setup.rst @@ -19,7 +19,7 @@ essential components of the simulation process: new_setup = m3d.create_setup("New_Setup") -.. image:: ../Resources/Setups.webp +.. image:: ../Resources/Setups.png :width: 800 :alt: Setup Editing and Creation diff --git a/doc/source/User_guide/variables.rst b/doc/source/User_guide/variables.rst index 3064ef7853f..c789af17422 100644 --- a/doc/source/User_guide/variables.rst +++ b/doc/source/User_guide/variables.rst @@ -13,7 +13,7 @@ for the variable name, a project-wide variable is created: hfss["$dim"] = "1mm" # project variable -.. image:: ../Resources/aedt_variables.webp +.. image:: ../Resources/aedt_variables.png :width: 800 :alt: Variable Management @@ -36,7 +36,7 @@ access the ``variable_manager`` object for a more comprehensive set of functions '34 * $PrjVar1/$PrjVar2' -.. image:: ../Resources/variables_advanced.webp +.. image:: ../Resources/variables_advanced.png :width: 600 :alt: Variable Management @@ -54,7 +54,7 @@ optimetrics setups by allowing you to read existing configurations, make edits, m3d.parametrics.add("Rload", 0.1, 1, 0.1) -.. image:: ../Resources/Optimetrics_Parametric.webp +.. image:: ../Resources/Optimetrics_Parametric.png :width: 800 :alt: Optimetrics creation diff --git a/doc/source/conf.py b/doc/source/conf.py index 3acb1e171cd..4e3a6246035 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -28,7 +28,7 @@ # Additionally, when documenting images in formats other than the supported ones, # make sure to specify their types. from sphinx.builders.latex import LaTeXBuilder -LaTeXBuilder.supported_image_types = ["image/png", "image/pdf", "image/svg+xml", "image/webp" ] +LaTeXBuilder.supported_image_types = ["image/png", "image/pdf", "image/svg+xml"] from sphinx.writers.latex import CR from sphinx.writers.latex import LaTeXTranslator @@ -139,20 +139,20 @@ def setup(app): # extensions coming with Sphinx_PyAEDT (named 'sphinx.ext.*') or your custom # ones. extensions = [ - "sphinx.ext.intersphinx", + "ansys_sphinx_theme.extension.linkcode", + "numpydoc", + "recommonmark", "sphinx.ext.autodoc", - "sphinx.ext.todo", "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", "sphinx.ext.coverage", - "sphinx_copybutton", - "sphinx_design", "sphinx.ext.graphviz", - "sphinx.ext.mathjax", + "sphinx.ext.imgconverter", "sphinx.ext.inheritance_diagram", - "numpydoc", - "ansys_sphinx_theme.extension.linkcode", - "recommonmark", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.todo", + "sphinx_copybutton", + "sphinx_design", ] # Intersphinx mapping diff --git a/pyaedt/generic/plot.py b/pyaedt/generic/plot.py index aaea4ac2378..839ac8aea27 100644 --- a/pyaedt/generic/plot.py +++ b/pyaedt/generic/plot.py @@ -99,14 +99,13 @@ def is_notebook(): bool """ try: - from IPython import get_ipython - shell = get_ipython().__class__.__name__ - # Check if shell is Jupyter notebook or QTconsole - return shell == "ZMQInteractiveShell" - # Probably standard Python interpreter + if shell == "ZMQInteractiveShell": + return True # Jupyter notebook or qtconsole + else: + return False except NameError: - return False + return False # Probably standard Python interpreter def is_float(istring): @@ -386,7 +385,7 @@ def plot_polar_chart( @pyaedt_function_handler() @update_plot_settings -def plot_3d_chart(plot_data, size=(2000, 1000), xlabel="", ylabel="", title="", snapshot_path=None, show=True): +def plot_3d_chart(plot_data, size=(2000, 1000), xlabel="", ylabel="", title="", snapshot_path=None): """Create a Matplotlib 3D plot based on a list of data. Parameters @@ -404,9 +403,6 @@ def plot_3d_chart(plot_data, size=(2000, 1000), xlabel="", ylabel="", title="", Plot Title label. snapshot_path : str Full path to image file if a snapshot is needed. - show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. Returns ------- @@ -436,16 +432,14 @@ def plot_3d_chart(plot_data, size=(2000, 1000), xlabel="", ylabel="", title="", fig.set_size_inches(size[0] / dpi, size[1] / dpi) if snapshot_path: fig.savefig(snapshot_path) - if show: + else: fig.show() return fig @pyaedt_function_handler() @update_plot_settings -def plot_2d_chart( - plot_data, size=(2000, 1000), show_legend=True, xlabel="", ylabel="", title="", snapshot_path=None, show=True -): +def plot_2d_chart(plot_data, size=(2000, 1000), show_legend=True, xlabel="", ylabel="", title="", snapshot_path=None): """Create a Matplotlib plot based on a list of data. Parameters ---------- @@ -465,9 +459,6 @@ def plot_2d_chart( snapshot_path : str, optional Full path to image file if a snapshot is needed. The default value is ``None``. - show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. Returns ------- @@ -498,7 +489,7 @@ def plot_2d_chart( if snapshot_path: fig.savefig(snapshot_path) - if show: + elif not is_notebook(): fig.show() return fig @@ -549,10 +540,9 @@ def plot_matplotlib( Default is `False`. annotations : list, optional List of annotations to add to the plot. The format is [x, y, string, dictionary of font options]. - The default is ``None``. + Default is `None`. show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. + Whether to show the plot or return the matplotlib object. Default is `True`. Returns @@ -646,10 +636,10 @@ def plot_contour( levels : int, optional Color map levels. The default is ``64``. snapshot_path : str, optional - Full path to save the image to. The default is ``None``. + Full path to save the image save. The default is ``None``. show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. + Whether to render the figure. The default is ``True``. If + ``False``, the image is not drawn. Returns ------- diff --git a/pyaedt/modules/AdvancedPostProcessing.py b/pyaedt/modules/AdvancedPostProcessing.py index 081ed166218..d3d3eb507af 100644 --- a/pyaedt/modules/AdvancedPostProcessing.py +++ b/pyaedt/modules/AdvancedPostProcessing.py @@ -340,20 +340,17 @@ def plot_field_from_fieldplot( project_path : str, optional Path for saving the image file. The default is ``""``. mesh_plot : bool, optional - Whether to create and plot the mesh over the fields. The - default is ``False``. + Whether to create and plot the mesh over the fields. The default is ``False``. image_format : str, optional - Format of the image file. Options are ``"jpg"``, - ``"png"``, ``"svg"``, and ``"webp"``. The default is - ``"jpg"``. + Format of the image file. Options are ``"jpg"``, ``"png"``, ``"svg"``, and ``"webp"``. + The default is ``"jpg"``. view : str, optional View to export. Options are ``"isometric"``, ``"xy"``, ``"xz"``, ``"yz"``. plot_label : str, optional Type of the plot. The default is ``"Temperature"``. plot_folder : str, optional Plot folder to update before exporting the field. - The default is ``None``, in which case all plot - folders are updated. + The default is ``None``, in which case all plot folders are updated. show : bool, optional Export Image without plotting on UI. scale_min : float, optional @@ -497,9 +494,8 @@ def plot_field( export_path : str, optional Image export path. Default is ``None`` to not export the image. image_format : str, optional - Format of the image file. Options are ``"jpg"``, - ``"png"``, ``"svg"``, and ``"webp"``. The default is - ``"jpg"``. + Format of the image file. Options are ``"jpg"``, ``"png"``, ``"svg"``, and ``"webp"``. + The default is ``"jpg"``. keep_plot_after_generation : bool, optional Either to keep the Field Plot in AEDT after the generation is completed. Default is ``False``. dark_mode : bool, optional @@ -811,13 +807,7 @@ def animate_fields_from_aedtplt( @pyaedt_function_handler() def create_3d_plot( - self, - solution_data, - nominal_sweep=None, - nominal_value=None, - primary_sweep="Theta", - secondary_sweep="Phi", - show=True, + self, solution_data, nominal_sweep=None, nominal_value=None, primary_sweep="Theta", secondary_sweep="Phi" ): """Create a 3D plot using Matplotlib. @@ -833,20 +823,17 @@ def create_3d_plot( Primary sweep. The default is ``"Theta"``. secondary_sweep : str, optional Secondary sweep. The default is ``"Phi"``. - show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. Returns ------- - :class:`matplotlib.plt` - Matplotlib fig object. + bool + ``True`` when successful, ``False`` when failed. """ if nominal_value: solution_data.intrinsics[nominal_sweep] = nominal_value if nominal_value: solution_data.primary_sweep = primary_sweep - return solution_data.plot_3d(x_axis=primary_sweep, y_axis=secondary_sweep, show=show) + return solution_data.plot_3d(x_axis=primary_sweep, y_axis=secondary_sweep) @pyaedt_function_handler(frames_list="frames", output_gif_path="gif_path") def plot_scene( diff --git a/pyaedt/modules/solutions.py b/pyaedt/modules/solutions.py index 71c3a5961cf..8e798b5c0b0 100644 --- a/pyaedt/modules/solutions.py +++ b/pyaedt/modules/solutions.py @@ -819,9 +819,8 @@ def plot( title="", snapshot_path=None, is_polar=False, - show=True, ): - """Create a Matplotlib plot based on a list of data. + """Create a matplotlib plot based on a list of data. Parameters ---------- @@ -847,12 +846,9 @@ def plot( title : str Plot title label. snapshot_path : str - Full path to the image file if a snapshot is needed. + Full path to image file if a snapshot is needed. is_polar : bool, optional - Whether this is a polar plot. The default is ``False``. - show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. + Set to `True` if this is a polar plot. Returns ------- @@ -897,9 +893,9 @@ def plot( if len(data_plot) > 15: show_legend = False if is_polar: - return plot_polar_chart(data_plot, size, show_legend, x_label, y_label, title, snapshot_path, show=show) + return plot_polar_chart(data_plot, size, show_legend, x_label, y_label, title, snapshot_path) else: - return plot_2d_chart(data_plot, size, show_legend, x_label, y_label, title, snapshot_path, show=show) + return plot_2d_chart(data_plot, size, show_legend, x_label, y_label, title, snapshot_path) @pyaedt_function_handler(xlabel="x_label", ylabel="y_label", math_formula="formula") def plot_3d( @@ -913,7 +909,6 @@ def plot_3d( formula=None, size=(2000, 1000), snapshot_path=None, - show=True, ): """Create a matplotlib 3d plot based on a list of data. @@ -940,9 +935,6 @@ def plot_3d( snapshot_path : str, optional Full path to image file if a snapshot is needed. The default is ``None``. - show : bool, optional - Whether to render the figure. The default is ``True``. If ``False``, the - figure is not drawn. Returns ------- @@ -993,7 +985,7 @@ def plot_3d( y_label = y_axis if not title: title = "Simulation Results Plot" - return plot_3d_chart(data_plot, size, x_label, y_label, title, snapshot_path, show=show) + return plot_3d_chart(data_plot, size, x_label, y_label, title, snapshot_path) @pyaedt_function_handler() def ifft(self, curve_header="NearE", u_axis="_u", v_axis="_v", window=False):