From cf105012498314f5ecb9e740268d698781d735cf Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Mon, 24 Apr 2023 22:25:42 +0200
Subject: [PATCH] Use OO-style

---
 Inst_eddies/Analysis/plot_velocity.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Inst_eddies/Analysis/plot_velocity.py b/Inst_eddies/Analysis/plot_velocity.py
index e4b77c91..4a3dd3fe 100755
--- a/Inst_eddies/Analysis/plot_velocity.py
+++ b/Inst_eddies/Analysis/plot_velocity.py
@@ -75,14 +75,14 @@ with netCDF4.Dataset(args.input_file) as f:
                                   vgos[lat_mask][:, lon_mask],
                                   scale = args.scale, scale_units = "width",
                                   transform = src_crs)
-        plt.quiverkey(quiver_return, 0.9, 0.9, 1, r"1 m s$^{-1}$",
-                      coordinates = "figure")
+        ax.quiverkey(quiver_return, 0.9, 0.9, 1, r"1 m s$^{-1}$",
+                     coordinates = "figure")
 
 ax.gridlines(draw_labels = True)
 ax.coastlines()
 
 if args.save:
-    plt.savefig(f"plot_velocity.{args.save}")
+    fig.savefig(f"plot_velocity.{args.save}")
     print(f'Created "plot_velocity.{args.save}".')
 else:
     plt.show()
-- 
GitLab