Polar Plots¶
Plots in polar coordinates are drawn on ziaplot.polar.Polar
axes.
While a ziaplot.dataseries.Line
can be drawn on a polar axis,
the x and y values are Cartesian.
To add a line in polar (radius and angle) form, use the ziaplot.polar.LinePolar
series, which can take angles in degrees or radians.
The style.polar.rlabeltheta style parameter can be useful to align the radius/magnitude tick labels so they don’t get hidden by data.
th = zp.linspace(0, 2*math.pi, 500)
r = [math.cos(7*t+math.pi/6) for t in th]
with zp.Polar() as p:
p.style.polar.rlabeltheta = 15
zp.LinePolar(r, th)
Smith Charts¶
Normalized Smith Charts are created using ziaplot.smith.Smith
. The grid density can be changed using the grid argument.
Discrete data may be plotted on Smith charts using either ziaplot.dataseries.Line
or ziaplot.polar.LinePolar
, depending on the data format.
Alternatively, curves of constant resistance and constant reactance may be drawn with ziaplot.smith.SmithConstResistance
and ziaplot.smith.SmithConstReactance
.
with zp.Smith(grid='coarse'):
zp.SmithConstReactance(0.5)
zp.SmithConstResistance(1)