Superimpose Contours on Scattersmith

Hello everyone.

I work in the RF world, and I’m trying to plot contours on top of a smith chart. This is a fairly common task that’s previously been accomplished in MATLAB, but I’m working on setting up an interactive dashboard with Dash.

For my prototype, I tried the following.

fig = go.Figure()

        y=yr[:, 0],

        real=df['Zl'].apply(lambda x: x.real/50), 
        imag=df['Zl'].apply(lambda x: x.imag/50),

I played around with the order of operations, but the result was the same. You get a smith chart in the middle of the display, and then the contour plot in the background on a different set of axes.

Ultimately I’d like to have a smith chart with scattered data, and superimpose contours on top of the smith chart. The points represent where data has been measured, and the contours show the parameters of interest. I’m new to plotly and Dash so I’m not sure how to go about this.

Below is a plot of roughly what I’m trying to achieve.

(Credit: Microwaves101 | Load Pull for Power Devices)