From a7ab1251a52352ddaae16c20d138ff9a6211fa20 Mon Sep 17 00:00:00 2001 From: Samuel Lopez <85613111+Samuelopez-ansys@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:24:28 +0100 Subject: [PATCH] Simplify plot (#288) --- examples/high_frequency/antenna/dipole.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/high_frequency/antenna/dipole.py b/examples/high_frequency/antenna/dipole.py index a30f1da0..9a852b9a 100644 --- a/examples/high_frequency/antenna/dipole.py +++ b/examples/high_frequency/antenna/dipole.py @@ -110,22 +110,25 @@ report_category="Far Fields", ) -# Create a far fields report using the ``report_by_category.far field()`` method. +# Create a far field report. new_report = hfss.post.reports_by_category.far_field( "db(RealizedGainTotal)", hfss.nominal_adaptive, "3D" ) -new_report.variations = variations -new_report.primary_sweep = "Theta" -new_report.create("Realized2D") - -# Generate multiple plots using the ``new_report`` object. This code generates -# 2D and 3D polar plots. - new_report.report_type = "3D Polar Plot" new_report.secondary_sweep = "Phi" new_report.create("Realized3D") +# This code generates a 2D plot. + +hfss.field_setups[2].phi_step = 90 +new_report2 = hfss.post.reports_by_category.far_field( + "db(RealizedGainTotal)", hfss.nominal_adaptive, hfss.field_setups[2].name +) +new_report2.variations = variations +new_report2.primary_sweep = "Theta" +new_report2.create("Realized2D") + # Get solution data using the ``new_report`` object and postprocess or plot the # data outside AEDT.