From 8853e01b501cfef8d3197a0e9c7d64705d5fa104 Mon Sep 17 00:00:00 2001 From: STEVAN Antoine <antoine.stevan@isae-supaero.fr> Date: Fri, 12 Jul 2024 07:22:58 +0000 Subject: [PATCH] fix colors and markers for elliptic curves in plots (dragoon/komodo!157) ## results      --- benchmarks/.nushell/commit/plot.nu | 23 +++++++++++++++++++++++ benchmarks/.nushell/setup/plot.nu | 23 +++++++++++++++++++++++ benchmarks/README.md | 23 +++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/benchmarks/.nushell/commit/plot.nu b/benchmarks/.nushell/commit/plot.nu index 4e0726e9..201f7d5d 100644 --- a/benchmarks/.nushell/commit/plot.nu +++ b/benchmarks/.nushell/commit/plot.nu @@ -16,6 +16,29 @@ export def main [data: path, --save: path] { | group-by name --to-table | reject items.name | rename --column { group: "name", items: "points" } + | insert style.color {|it| + match $it.name { + "BLS12-381" => "tab:blue" + "PALLAS" => "tab:green" + "BN254" => "tab:orange" + "CP6-782" => "tab:olive" + "ED-MNT4-298" => "tab:pink" + "MNT4-753" => "tab:red" + _ => "tab:grey" + } + } + | insert style.line.marker.shape {|it| + match $it.name { + "BLS12-381" => "s" + "PALLAS" => "o" + "BN254" => "^" + "CP6-782" => "*" + "ED-MNT4-298" => "X" + "MNT4-753" => "d" + _ => null + } + } + | insert style.line.marker.size { 10 } | sort-by name let options = [ diff --git a/benchmarks/.nushell/setup/plot.nu b/benchmarks/.nushell/setup/plot.nu index 44e86de7..351ea18d 100644 --- a/benchmarks/.nushell/setup/plot.nu +++ b/benchmarks/.nushell/setup/plot.nu @@ -21,6 +21,29 @@ export def main [data: path, --save: path] { | group-by name --to-table | reject items.name | rename --column { group: "name", items: "points" } + | insert style.color {|it| + match $it.name { + "BLS12-381" => "tab:blue" + "PALLAS" => "tab:green" + "BN254" => "tab:orange" + "CP6-782" => "tab:olive" + "ED-MNT4-298" => "tab:pink" + "MNT4-753" => "tab:red" + _ => "tab:grey" + } + } + | insert style.line.marker.shape {|it| + match $it.name { + "BLS12-381" => "s" + "PALLAS" => "o" + "BN254" => "^" + "CP6-782" => "*" + "ED-MNT4-298" => "X" + "MNT4-753" => "d" + _ => null + } + } + | insert style.line.marker.size { 10 } | sort-by name let options = [ diff --git a/benchmarks/README.md b/benchmarks/README.md index b35cb098..a99b6dfe 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -63,6 +63,29 @@ for graph in [ | rename --column { n: "x", mean: "y", stddev: "e" } | group-by name --to-table | rename --column { group: "name", items: "points" } + | insert style.color {|it| + match $it.name { + "BLS12-381" => "tab:blue" + "PALLAS" => "tab:green" + "BN254" => "tab:orange" + "CP6-782" => "tab:olive" + "ED-MNT4-298" => "tab:pink" + "MNT4-753" => "tab:red" + _ => "tab:grey" + } + } + | insert style.line.marker.shape {|it| + match $it.name { + "BLS12-381" => "s" + "PALLAS" => "o" + "BN254" => "^" + "CP6-782" => "*" + "ED-MNT4-298" => "X" + "MNT4-753" => "d" + _ => null + } + } + | insert style.line.marker.size { 10 } gplt plot ...[ --title $graph.title --x-label "n" -- GitLab