Skip to content

Commit

Permalink
plot: Change default line mode to linear (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf authored Sep 7, 2024
2 parents 3d79a50 + cc0589f commit 8fdcf20
Show file tree
Hide file tree
Showing 2 changed files 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
Binary file modified tests/plot/legend/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8fdcf20

Please sign in to comment.