Add legend
This commit is contained in:
parent
1c9f6e9a55
commit
67926de45c
3 changed files with 31 additions and 17 deletions
7
demo.ss
7
demo.ss
|
@ -2,7 +2,8 @@
|
|||
|
||||
(export main)
|
||||
|
||||
(import :std/misc/string
|
||||
(import :std/format
|
||||
:std/misc/string
|
||||
:dlozeve/fancy/format
|
||||
:dlozeve/uniplot/lineplot)
|
||||
|
||||
|
@ -11,4 +12,6 @@
|
|||
(ys1 (map cos xs))
|
||||
(ys2 (map (lambda (x) (/ 1 (+ 0.5 x))) xs))
|
||||
(ys3 (map (lambda (x) (sin (* 2 x))) xs)))
|
||||
(displayln (line-plot [xs ys1 ys2 ys3] xlabel: "time"))))
|
||||
(displayln (line-plot [xs ys1 ys2 ys3]
|
||||
xlabel: "time"
|
||||
names: ["cos(time)" "1 / (time + 0.5)" "sin(2 × time)"]))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue