Skip to content

Commit 26e1eab

Browse files
committed
Improve contour docs
1 parent b50851a commit 26e1eab

File tree

2 files changed

+52
-628
lines changed

2 files changed

+52
-628
lines changed

docs/04_3_contour-plots.fsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ let z =
6060
A contour plot is a graphical technique for representing a 3-dimensional surface by plotting
6161
constant z slices, called contours, on a 2-dimensional format. That is, given a value for z,
6262
lines are drawn for connecting the (x,y) coordinates where that z value occurs.
63-
The contour plot is an alternative to a 3-D surface plot.
6463
6564
The contour plot is an alternative to a 3-D surface plot.
6665
@@ -79,3 +78,28 @@ contour1
7978
(***hide***)
8079
contour1 |> GenericChart.toChartHTML
8180
(***include-it-raw***)
81+
82+
(**
83+
## Smooth Contour Coloring
84+
85+
to apply heatmap gradient coloring between each contour level, set the `ContourColoring` to `heatmap`:
86+
*)
87+
88+
Chart.Contour(
89+
z,
90+
ContoursColoring = StyleParam.ContourColoring.Heatmap
91+
)
92+
93+
(**
94+
## Contour Line Labels
95+
96+
Use `ContourLabelFont` to set a contour label font, and display the labels with `ShowContourLabels`:
97+
98+
*)
99+
100+
Chart.Contour(
101+
z,
102+
ContoursColoring = StyleParam.ContourColoring.Heatmap,
103+
ShowContourLabels = true,
104+
ContourLabelFont = Font.init(Size = 12, Color = Color.fromKeyword White)
105+
)

0 commit comments

Comments
 (0)