Skip to content

Commit 8fdcf20

Browse files
plot: Change default line mode to linear (#42)
2 parents 3d79a50 + cc0589f commit 8fdcf20

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/plot/line.typ

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
line = (type: line)
4141
}
4242

43-
let line-type = line.at("type", default: "linear")
43+
let line-type = line.at("type", default: "raw")
4444
assert(line-type in ("raw", "linear", "spline", "vh", "hv", "hvh"))
4545

4646
// Transform data into line-data
@@ -154,13 +154,12 @@
154154
/// to the default sampling. This parameter gets passed to `sample-fn`.
155155
/// - line (string, dictionary): Line type to use. The following types are
156156
/// supported:
157-
/// / `"linear"`: Draw linear lines between points
158-
/// / `"spline"`: Calculate a Catmull-Rom through all points
157+
/// / `"raw"`: Plot raw data
158+
/// / `"linear"`: Linearize data
159+
/// / `"spline"`: Calculate a Catmull-Rom curve through all points
159160
/// / `"vh"`: Move vertical and then horizontal
160161
/// / `"hv"`: Move horizontal and then vertical
161162
/// / `"hvh"`: Add a vertical step in the middle
162-
/// / `"raw"`: Like linear, but without linearization taking place. This is
163-
/// meant as a "fallback" for either bad performance or bugs.
164163
///
165164
/// If the value is a dictionary, the type must be
166165
/// supplied via the `type` key. The following extra
@@ -217,7 +216,7 @@
217216
mark-style: (:),
218217
samples: 50,
219218
sample-at: (),
220-
line: "linear",
219+
line: "raw",
221220
axes: ("x", "y"),
222221
label: none,
223222
data
@@ -427,7 +426,7 @@
427426
domain: auto,
428427
samples: 50,
429428
sample-at: (),
430-
line: "linear",
429+
line: "raw",
431430
axes: ("x", "y"),
432431
label: none,
433432
style: (:)) = {

tests/plot/legend/ref/1.png

36 Bytes
Loading

0 commit comments

Comments
 (0)