From edf35da831d0b140b7c09aa6cc818e5dd5c5fe42 Mon Sep 17 00:00:00 2001
From: Klaus Rabbertz <klaus.rabbertz@cern.ch>
Date: Thu, 27 Apr 2023 17:34:06 +0200
Subject: [PATCH] python3 matplotlib fixes

---
 tools/plotting/fastnnlo_scaledep.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/plotting/fastnnlo_scaledep.py b/tools/plotting/fastnnlo_scaledep.py
index 3e0965d2..30b7c86d 100755
--- a/tools/plotting/fastnnlo_scaledep.py
+++ b/tools/plotting/fastnnlo_scaledep.py
@@ -91,7 +91,8 @@ from fastnlo import SetGlobalVerbosity
 # Redefine ScalarFormatter
 class ScalarFormatterForceFormat(ScalarFormatter):
     # Override function that finds format to use.
-    def _set_format(self, vmin, vmax):
+    #    def _set_format(self, vmin, vmax):
+    def _set_format(self):
         self.format = "%1.2f"  # Give format here
 
 
@@ -142,7 +143,7 @@ def plotting(x_axis, xmin, xmax, iobs, xs_cn, xs_fl, xs_fu, dxsr_cn, xind, title
         fig = plt.figure(figsize=(7, 5))
         ax1 = plt.subplot(gs[:, :])
     ax1.set_xlim([xmin, xmax])
-    ax1.set_xscale('log', nonposx='clip')
+    ax1.set_xscale('log', nonpositive='clip')
     ax1.set_yscale('linear')
     # Texify labels
 #        tlabels = []
@@ -252,7 +253,7 @@ def plotting(x_axis, xmin, xmax, iobs, xs_cn, xs_fl, xs_fu, dxsr_cn, xind, title
         ax2 = plt.subplot(gs[2, :])
         #        ax2 = plt.subplot(gs[2, :], sharex=ax1)
         ax2.set_xlim([xmin, xmax])
-        ax2.set_xscale('log', nonposx='clip')
+        ax2.set_xscale('log', nonpositive='clip')
         ax2.set_yscale('linear')
         ax2.set_xlabel(r'%s' % xlabel, horizontalalignment='right',
                        x=1.0, verticalalignment='top', y=1.0)
-- 
GitLab