(**
// can't yet format YamlFrontmatter (["title: Polar line and scatter plots"; "category: Polar Charts"; "categoryindex: 8"; "index: 1"], Some { StartLine = 2 StartColumn = 0 EndLine = 6 EndColumn = 8 }) to pynb markdown
# Polar charts
[![Binder](https://plotly.net/img/badge-binder.svg)](https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath=8_0_polar_line-scatter-plots.ipynb)
[![Script](https://plotly.net/img/badge-script.svg)](https://plotly.net/8_0_polar_line-scatter-plots.fsx)
[![Notebook](https://plotly.net/img/badge-notebook.svg)](https://plotly.net/8_0_polar_line-scatter-plots.ipynb)
*Summary:* This example shows how to create polar charts in F#.
let's first create some data for the purpose of creating example charts:
*)
open Plotly.NET
// radial coordinates
let radial = [ 1; 2; 3; 4; 5; 6; 7;]
// angular coordinates
let theta = [0; 45; 90; 135; 200; 320; 184;]
(**
A polar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart
of three or more quantitative variables represented on axes starting from the same point.
The relative position and angle of the axes is typically uninformative.
In Polar Charts, a series is represented by a closed curve that connects points in the polar coordinate system.
Each data point is determined by the distance from the pole (the radial coordinate) and the angle from the fixed direction (the angular coordinate).
## Polar point charts
use `Chart.PointPolar` to create a polar plot that displays points on a polar coordinate system:
*)
let pointPolar = Chart.PointPolar(radial,theta)(* output:
*)
(**
## Polar line charts
use `Chart.LinePolar` to create a polar plot that displays a line connecting input the data on a polar coordinate system.
You can for example change the line style using `Chart.withLineStyle`
*)
let linePolar =
Chart.LinePolar(radial,theta)
|> Chart.withLineStyle(Color="purple",Dash=StyleParam.DrawingStyle.DashDot)(* output:
*)
(**
## Polar Spline charts
use `Chart.SpinePolar` to create a polar plot that displays a smoothed line connecting input the data on a polar coordinate system.
As for all other plots above, You can for example add labels to each datum:
*)
let splinePolar =
Chart.SplinePolar(
radial,
theta,
Labels=["one";"two";"three";"four";"five";"six";"seven"],
TextPosition=StyleParam.TextPosition.TopCenter,
ShowMarkers=true
)(* output:
*)