From a194a5b96fd04fc2cba494d1b78a7e700c2d2ec6 Mon Sep 17 00:00:00 2001
From: "a.stevan" <antoine.stevan@isae-supaero.fr>
Date: Tue, 28 May 2024 16:04:08 +0200
Subject: [PATCH] use all x values to compute the min and max

---
 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