Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot: Change default line mode to linear #42

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading