Skip to content

Commit

Permalink
fix the colorbar tick labels in plots (#212)
Browse files Browse the repository at this point in the history
the colorbar's were not showing the data values
  • Loading branch information
zingale authored Aug 30, 2024
1 parent 8f935b7 commit 32b3653
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions pyro/advection/simulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import importlib

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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")

Expand Down
2 changes: 0 additions & 2 deletions pyro/advection_nonuniform/simulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import importlib

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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")

Expand Down
2 changes: 0 additions & 2 deletions pyro/compressible/simulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import importlib

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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")

Expand Down
2 changes: 0 additions & 2 deletions pyro/compressible_react/simulation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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")

Expand Down
4 changes: 1 addition & 3 deletions pyro/diffusion/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import importlib
import math

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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}")

Expand Down
2 changes: 0 additions & 2 deletions pyro/swe/simulation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import importlib

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 32b3653

Please sign in to comment.