plot_cut#
- FfdSolutionData.plot_cut(quantity='RealizedGain', primary_sweep='phi', secondary_sweep_value=0, phi=0, theta=0, title='Far Field Cut', quantity_format='dB10', output_file=None, show=True, is_polar=False, show_legend=True)#
Create a 2D plot of a specified quantity in Matplotlib.
- Parameters:
- quantity
str,optional Quantity to plot. The default is
"RealizedGain". Available quantities are:"RealizedGain","RealizedGain_Theta","RealizedGain_Phi","rETotal","rETheta", and"rEPhi".- primary_sweep
str, optional. X-axis variable. The default is
"phi". Options are"phi"and"theta".- secondary_sweep_value
float,list,str,optional List of cuts on the secondary sweep to plot. The default is
0. Options are “all”, a single value float, or a list of float values.- phi
float,int,optional Phi scan angle in degrees. The default is
0.- theta
float,int,optional Theta scan angle in degrees. The default is
0.- title
str,optional Plot title. The default is
"RectangularPlot".- quantity_format
str,optional Conversion data function. Available functions are:
"abs","ang","dB10","dB20","deg","imag","norm", and"real".- output_file
str,optional Full path for the image file. The default is
None, in which case an image in not exported.- showbool,
optional Whether to show the plot. The default is
True. IfFalse, the Matplotlib instance of the plot is shown.- is_polarbool,
optional Whether this plot is a polar plot. The default is
True.- show_legendbool,
optional Whether to display the legend or not. The default is
True.
- quantity
- Returns:
ansys.aedt.core.visualization.plot.matplotlib.ReportPlotterMatplotlib figure object. If
show=True, a Matplotlib figure instance of the plot is returned. Ifshow=False, the plotted curve is returned.
Examples
>>> from ansys.aedt.core >>> app = ansys.aedt.core.Hfss(version="2025.2", design="Antenna") >>> setup_name = "Setup1 : LastAdaptive" >>> frequencies = [77e9] >>> sphere = "3D" >>> data = app.get_antenna_data(frequencies, setup_name, sphere) >>> data.plot_cut(theta=20)