'python plotly smith chart function behaviour is different from scikit-rf

Can someone explain why this two smith chart plot function for exactly same circle of plotly and scikit-rf are so different? And how can I make plotly plot like scikit-rf because I need reading values from smith chart which is not easy by scikit-rf plot?

def calc_circle(c, r):
  theta = np.linspace(0, 2*np.pi, 1000)
  return c + r*np.exp(1.0j*theta)

c,r=0.4,0.2
fig = go.Figure(go.Scattersmith(imag=np.imag(calc_circle(c, r)), real=np.real(calc_circle(c, r)),marker_color="green",showlegend=True,name='Hello'))
fig.show()

This is what plotly plot

    n = rf.Network(name="out", s=calc_circle(c, r))
    n.plot_s_smith(lw=2,draw_labels=True)

This is what scikit-rf plot



Solution 1:[1]

Plotly Scattersmith requires that the imag and real data are provided in terms of normalized impedance values instead of reflection coefficient values. What this means is that results from your function calc_circle needs a conversion using the simple formula z = (1 + rho) / (1 - rho), where z is the normalized impedance and rho is the reflection coefficients that you obtain using the calc_circle function.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BrokenBenchmark