You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/plot.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,21 @@ plt := lab.NewPlot(b)
82
82
plots.NewLine(plt, data)
83
83
```
84
84
85
+
## Out-of-Range data
86
+
87
+
You can set fixed Min / Max ranges to plot, for either axis. By default, the out-of-range data will show up as a break in the plot line, with red X's marking the out-of-range points. This behavior can be adjusted by changing the `OutOfRange` property in the [[doc:plot.PlotStyle]].
88
+
89
+
```Goal
90
+
data := #rand(10)#
91
+
plot.SetStyler(data, func(s *plot.Style) {
92
+
s.Range.SetMin(0.2) // sets a FixMin flag to indicate a fixed min has been set.
93
+
s.Range.SetMax(0.8)
94
+
s.Plot.OutOfRange = plot.BreakMark // default
95
+
})
96
+
plt := lab.NewPlot(b)
97
+
plots.NewLine(plt, data)
98
+
```
99
+
85
100
## Plot Types
86
101
87
102
The following are the builtin standard plot types, in the `plots` package:
0 commit comments