Summary: This example shows how to create smith charts in F#.
let's first create some data for the purpose of creating example charts:
open Plotly.NET
// real coordinates
let real = [0.5; 1.; 2.; 3.]
// imaginary coordinates
let imaginary = [0.5; 1.; 2.; 3.]
The Smith chart, invented by Phillip H. Smith (1905�1987) and independently by Mizuhashi Tosaku, is a graphical calculator or nomogram designed for electrical and electronics engineers specializing in radio frequency (RF) engineering to assist in solving problems with transmission lines and matching circuits
The Smith chart is a mathematical transformation of the two-dimensional Cartesian complex plane. Complex numbers with positive real parts map inside the circle. Those with negative real parts map outside the circle. If we are dealing only with impedances with non-negative resistive components, our interest is focused on the area inside the circle.
(Wikipedia).
Still, you can plot any kind of imaginary numbers on this plane.
use Chart.PointSmith
to create a chart that displays points on a smith subplot:
let pointSmith = Chart.PointSmith(real,imaginary)
use Chart.LineSmith
to create a plot that displays a line connecting the data on a smith subplot.
This example also changes the styles of the line.
let lineSmith =
Chart.LineSmith(
real,
imaginary,
LineDash = StyleParam.DrawingStyle.DashDot,
LineColor = Color.fromKeyword Purple
)
use Chart.BubbleSmith
to create a plot that displays datums on a smith subplot, with an additional 3rd dimension set as the marker size.
As for all other plots above, You can for example add labels to each datum:
let bubbleSmith =
Chart.BubbleSmith(
real,
imaginary,
sizes = [10;20;30;40],
MultiText=["one";"two";"three";"four";"five";"six";"seven"],
TextPosition=StyleParam.TextPosition.TopCenter
)