how to plot Axial Ratio from pyaedt?

Options
Otty80
Otty80 Member Posts: 7
First Comment

Hi, i can plot S11 plot from pyaedt with simple instructions but I'm not able to plot axial ratio.

I use this "raw" code:

################# PLOT SETTING ##################

import matplotlib.pyplot as plt
from cycler import cycler
size=30
params = {'legend.fontsize':size*0.60 ,
     'legend.facecolor':'ghostwhite',
     'legend.loc':'best',
     'figure.figsize': (100,50),
     'axes.grid':True,
     'axes.labelsize': size*0.75,
     'axes.titlesize': size*0.75,
     'axes.titlepad': 10,
     'axes.linewidth':9,
     'lines.markersize':10,#15,
     'xtick.labelsize': size*0.75,
     'ytick.labelsize': size*0.75
     }
plt.rcParams["axes.grid"] =True
plt.rc('axes', prop_cycle=(cycler('color', ['b', 'g', 'r', 'c','m','y','k','#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']) + cycler('linestyle', [':', '-.', '-', '--',':', '-.', '-', '--',':', '-.', '-', '--',':', '-.', '-', '--',':'])+ cycler('marker', [".", ",", "o", "v", "^", "<", ">", "s", "p", "P", "*", "h", "H", "+", "x", "X","_"]) + cycler('markevery', [0.3, 0.2, 0.3, 0.3,0.4, 0.3, 0.4, 0.3,0.4, 0.4, 0.3, 0.3,0.2, 0.2, 0.3, 0.4,0.4])))
plt.rcParams.update(params)
##########################################################################
### |Sii| ###
traces = hfss.get_traces_for_plot(True,False,category="dB(S")
solutions = hfss.post.get_solution_data(traces)
sol2=solutions.plot(traces,xlabel="Freq[GHz]",ylabel="$|S_{ii}|$",title="Simulation $|S_{ii}|$")
sol2.savefig('Sii'+'.pdf', bbox_inches='tight')
report = hfss.post.create_report(traces) # Creates a report in HFSS
report.edit_y_axis(label="|S(ii)|")
report.edit_x_axis(label="Freq")


Tagged: