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

Basic plotting support #464

Merged
merged 25 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0cb13a2
Very basic plotting support
sharkdp Jun 11, 2024
99074d4
Add return type
sharkdp Jun 13, 2024
28e61b4
Reimplement plot-functionality using plotly
sharkdp Jul 1, 2024
2e070dd
Merge remote-tracking branch 'origin/master' into plotting
sharkdp Jul 1, 2024
7386aab
Merge remote-tracking branch 'origin/master' into plotting
sharkdp Jul 29, 2024
ca2d5e8
Merge remote-tracking branch 'origin/master' into plotting
sharkdp Aug 3, 2024
f18e1af
Fix list handling
sharkdp Aug 5, 2024
ab0bf93
Use larger number of points
sharkdp Aug 5, 2024
a75e566
Merge remote-tracking branch 'origin/master' into plotting
sharkdp Aug 5, 2024
7e351ee
Change postfix apply to |>
sharkdp Aug 5, 2024
dae3e67
Allow empty lines after postfix apply
sharkdp Aug 5, 2024
5cae72d
Merge branch 'change-postfix-apply-operator' into plotting
sharkdp Aug 5, 2024
22b194c
Use reverse function application for optional arguments
sharkdp Aug 5, 2024
c833a57
Rename module
sharkdp Aug 5, 2024
a64c7ed
Rename function
sharkdp Aug 5, 2024
12abf56
Merge remote-tracking branch 'origin/master' into plotting
sharkdp Aug 5, 2024
2c1f149
Add support for bar charts
sharkdp Aug 7, 2024
07c6860
Fix WASM build
sharkdp Aug 8, 2024
b6fd9e4
Fix tests
sharkdp Aug 8, 2024
a10e49a
Move examples, do not execute them during testing
sharkdp Aug 9, 2024
40eb34f
Merge branch 'master' into plotting
sharkdp Aug 9, 2024
fe47faa
Merge branch 'master' into plotting
sharkdp Aug 29, 2024
3b1f90b
Fix typo
sharkdp Aug 30, 2024
35b7139
Use noembed feature of plotly.rs
sharkdp Aug 30, 2024
1b5ad17
Update to official repo
sharkdp Sep 13, 2024
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
503 changes: 500 additions & 3 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions examples/interactive/bar_chart.nbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let names = ["Iron", "Copper", "Silver", "Gold", "Platinum"]
let elements = map(element, names)

fn density(e: ChemicalElement) -> MassDensity = e.density

let densities = map(density, elements)

bar_chart(densities) |>
xlabels(names) |>
value_label("Density") |>
show
10 changes: 10 additions & 0 deletions examples/interactive/line_plot.nbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let A0 = 3 cm
let ω = 20 Hz
let λ = 1.5 s

fn amplitude(t) = A0 exp(-t/λ) cos(ω t)

line_plot(amplitude, 0 s, 8 s) |>
xlabel("Time") |>
ylabel("Amplitude") |>
show
Loading
Loading