From f270ac3e5792eee0bf42d222984f20bd7bd4cc9e Mon Sep 17 00:00:00 2001
From: STEVAN Antoine <antoine.stevan@isae-supaero.fr>
Date: Wed, 29 May 2024 08:43:50 +0000
Subject: [PATCH] use all x values to compute x limits in `inbreeding plot`
 (dragoon/komodo!120)

---
 bins/inbreeding/plot.nu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bins/inbreeding/plot.nu b/bins/inbreeding/plot.nu
index cd2bcddf..189b09fd 100644
--- a/bins/inbreeding/plot.nu
+++ b/bins/inbreeding/plot.nu
@@ -98,8 +98,8 @@ export def main [
         | reject strategy
         | save --force /tmp/graphs.json
 
-    let x_min = open /tmp/graphs.json | get points.0.x | math min
-    let x_max = open /tmp/graphs.json | get points.0.x | math max
+    let x_min = open /tmp/graphs.json | get points | flatten | get x | math min
+    let x_max = open /tmp/graphs.json | get points | flatten | get x | math max
 
     let args = [
         --json-data-file /tmp/graphs.json
-- 
GitLab