aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plot.sh
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-06 21:45:45 +0200
committerEgor Tensin <egor@tensin.name>2026-06-06 21:45:45 +0200
commitfba834a617d2d2905cfc84595de100f8a5368c0a (patch)
tree2b629a72dacfec75a6cf28a298ff309602cfff5d /plot.sh
parentworkflows/ci: remove on: pull_request (diff)
downloadsorting-algorithms-fba834a617d2d2905cfc84595de100f8a5368c0a.tar.gz
sorting-algorithms-fba834a617d2d2905cfc84595de100f8a5368c0a.zip
sort out scripts into proper directories
Diffstat (limited to '')
-rwxr-xr-xscripts/plot.sh (renamed from plot.sh)15
1 files changed, 8 insertions, 7 deletions
diff --git a/plot.sh b/scripts/plot.sh
index 60bad3a..d310dcd 100755
--- a/plot.sh
+++ b/scripts/plot.sh
@@ -32,17 +32,18 @@ main() {
local max="$default_max"
[ "$#" -ge 4 ] && max="$4"
- mkdir -p -- "$script_dir/img"
+ cd -- "$script_dir/.."
+ mkdir -p -- img
local input_kind
for input_kind in best average worst; do
local output_name="${algorithm}_${iterations}_${input_kind}_${min}_${max}.png"
- python "$script_dir/plot.py" \
- "$algorithm" \
- --input "$input_kind" \
- --min "$min" --max "$max" \
- --iterations "$iterations" \
- --output "$script_dir/img/$output_name"
+ python -m algorithms.scripts.plot \
+ "$algorithm" \
+ --input "$input_kind" \
+ --min "$min" --max "$max" \
+ --iterations "$iterations" \
+ --output "img/$output_name"
done
}