Skip to content

Commit

Permalink
plot: Change default line mode to linear
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Sep 7, 2024
1 parent 3d79a50 commit 5782a70
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/plot/line.typ
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
line = (type: line)
}

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

// Transform data into line-data
Expand Down Expand Up @@ -154,13 +154,12 @@
/// to the default sampling. This parameter gets passed to `sample-fn`.
/// - line (string, dictionary): Line type to use. The following types are
/// supported:
/// / `"linear"`: Draw linear lines between points
/// / `"spline"`: Calculate a Catmull-Rom through all points
/// / `"raw"`: Plot raw data
/// / `"linear"`: Linearize data
/// / `"spline"`: Calculate a Catmull-Rom curve through all points
/// / `"vh"`: Move vertical and then horizontal
/// / `"hv"`: Move horizontal and then vertical
/// / `"hvh"`: Add a vertical step in the middle
/// / `"raw"`: Like linear, but without linearization taking place. This is
/// meant as a "fallback" for either bad performance or bugs.
///
/// If the value is a dictionary, the type must be
/// supplied via the `type` key. The following extra
Expand Down Expand Up @@ -217,7 +216,7 @@
mark-style: (:),
samples: 50,
sample-at: (),
line: "linear",
line: "raw",
axes: ("x", "y"),
label: none,
data
Expand Down Expand Up @@ -427,7 +426,7 @@
domain: auto,
samples: 50,
sample-at: (),
line: "linear",
line: "raw",
axes: ("x", "y"),
label: none,
style: (:)) = {
Expand Down

0 comments on commit 5782a70

Please sign in to comment.