plot_contour#

FfdSolutionData.plot_contour(quantity='RealizedGain', phi=0, theta=0, title=None, quantity_format='dB10', output_file=None, levels=64, polar=True, max_theta=180, show=True)#

Create a contour plot of a specified quantity in Matplotlib.

Parameters:
quantitystr, optional

Far field quantity to plot. The default is "RealizedGain". Available quantities are: "RealizedGain", "RealizedGain_Phi", "RealizedGain_Theta", "rEPhi", "rETheta", and "rETotal".

phifloat, int, optional

Phi scan angle in degrees. The default is 0.

thetafloat, int, optional

Theta scan angle in degrees. The default is 0.

titlestr, optional

Plot title. The default is "RectangularPlot".

quantity_formatstr, optional

Conversion data function. Available functions are: "abs", "ang", "dB10", "dB20", "deg", "imag", "norm", and "real".

output_filestr, optional

Full path for the image file. The default is None, in which case the file is not exported.

levelsint, optional

Color map levels. The default is 64.

showbool, optional

Whether to show the plot. The default is True. If False, the Matplotlib instance of the plot is shown.

polarbool, optional

Generate the plot in polar coordinates. The default is True. If False, the plot generated is rectangular.

max_thetafloat or int, optional

Maximum theta angle for plotting. The default is 180, which plots the far-field data for all angles. Setting max_theta to 90 limits the displayed data to the upper hemisphere, that is (0 < theta < 90).

Returns:
ansys.aedt.core.visualization.plot.matplotlib.ReportPlotter

Matplotlib figure object.

Examples

>>> from ansys.aedt.core
>>> app = ansys.aedt.core.Hfss(version="2024.2", design="Antenna")
>>> setup_name = "Setup1 : LastAdaptive"
>>> frequencies = [77e9]
>>> sphere = "3D"
>>> data = app.get_antenna_data(frequencies,setup_name,sphere)
>>> data.plot_contour()