From 32b36530765e05cb42359593ac33c786b33bfc5e Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 30 Aug 2024 15:12:46 -0400 Subject: [PATCH] fix the colorbar tick labels in plots (#212) the colorbar's were not showing the data values --- pyro/advection/simulation.py | 2 -- pyro/advection_nonuniform/simulation.py | 2 -- pyro/compressible/simulation.py | 2 -- pyro/compressible_react/simulation.py | 2 -- pyro/diffusion/simulation.py | 4 +--- pyro/swe/simulation.py | 2 -- 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/pyro/advection/simulation.py b/pyro/advection/simulation.py index cb4e47796..a9544f9aa 100644 --- a/pyro/advection/simulation.py +++ b/pyro/advection/simulation.py @@ -1,6 +1,5 @@ import importlib -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -121,7 +120,6 @@ def dovis(self): # needed for PDF rendering cb = axes.cbar_axes[0].colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") cb.solids.set_rasterized(True) cb.solids.set_edgecolor("face") diff --git a/pyro/advection_nonuniform/simulation.py b/pyro/advection_nonuniform/simulation.py index 1b5fd0fae..46a0424f3 100755 --- a/pyro/advection_nonuniform/simulation.py +++ b/pyro/advection_nonuniform/simulation.py @@ -1,6 +1,5 @@ import importlib -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -145,7 +144,6 @@ def dovis(self): # needed for PDF rendering cb = axes.cbar_axes[0].colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") cb.solids.set_rasterized(True) cb.solids.set_edgecolor("face") diff --git a/pyro/compressible/simulation.py b/pyro/compressible/simulation.py index de8fd4ddb..d0bcd6a5a 100644 --- a/pyro/compressible/simulation.py +++ b/pyro/compressible/simulation.py @@ -1,6 +1,5 @@ import importlib -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -381,7 +380,6 @@ def dovis(self): # needed for PDF rendering cb = axes.cbar_axes[n].colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") cb.solids.set_rasterized(True) cb.solids.set_edgecolor("face") diff --git a/pyro/compressible_react/simulation.py b/pyro/compressible_react/simulation.py index 4fa6fe61f..6abaecfa2 100644 --- a/pyro/compressible_react/simulation.py +++ b/pyro/compressible_react/simulation.py @@ -1,4 +1,3 @@ -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -107,7 +106,6 @@ def dovis(self): # needed for PDF rendering cb = axes.cbar_axes[n].colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") cb.solids.set_rasterized(True) cb.solids.set_edgecolor("face") diff --git a/pyro/diffusion/simulation.py b/pyro/diffusion/simulation.py index f05e21ccd..442135bcb 100644 --- a/pyro/diffusion/simulation.py +++ b/pyro/diffusion/simulation.py @@ -3,7 +3,6 @@ import importlib import math -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -146,8 +145,7 @@ def dovis(self): plt.ylabel("y") plt.title("phi") - cb = plt.colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") + plt.colorbar(img) plt.figtext(0.05, 0.0125, f"t = {self.cc_data.t:10.5f}") diff --git a/pyro/swe/simulation.py b/pyro/swe/simulation.py index f80190db3..db5327bac 100644 --- a/pyro/swe/simulation.py +++ b/pyro/swe/simulation.py @@ -1,6 +1,5 @@ import importlib -import matplotlib import matplotlib.pyplot as plt import numpy as np @@ -258,7 +257,6 @@ def dovis(self): # needed for PDF rendering cb = axes.cbar_axes[n].colorbar(img) - cb.formatter = matplotlib.ticker.FormatStrFormatter("") cb.solids.set_rasterized(True) cb.solids.set_edgecolor("face")