Skip to content

Commit

Permalink
Simplify plot (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys authored Dec 20, 2024
1 parent ba2ddb4 commit a7ab125
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions examples/high_frequency/antenna/dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit a7ab125

Please sign in to comment.