From 9cbfb9a48666de0db010dd209e054fb467c1a476 Mon Sep 17 00:00:00 2001
From: Michael Rudolf <rudolf@geo.tu-darmstadt.de>
Date: Tue, 28 Jan 2025 09:53:31 +0100
Subject: [PATCH] Check for existing data before trying to plot to avoid
 warnings

---
 u4py/plotting/plots.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/u4py/plotting/plots.py b/u4py/plotting/plots.py
index 45be2fc..91221b4 100644
--- a/u4py/plotting/plots.py
+++ b/u4py/plotting/plots.py
@@ -670,7 +670,8 @@ def geology_map(
                 suffix=f"_{row[1].group:05}",
                 out_folder=shp_path,
             )
-        fault_data.plot(ax=ax, color="k")
+        if fault_data:
+            fault_data.plot(ax=ax, color="k")
 
         # Formatting and other stuff
         u4plotfmt.add_scalebar(ax=ax, width=plot_buffer * 4)
-- 
GitLab