Skip to content

Commit 87cd300

Browse files
committed
project.plot2d bathymetry labels formatted to be whole numbers
1 parent bb5a447 commit 87cd300

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

famodel/project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,8 @@ def plot2d(self, ax=None, plot_seabed=True,plot_bathymetry=True, plot_boundary=T
20112011
# >>>> TODO: Update the above to add optional inputs for bounds (vmin/vmax) on contour plot colors for bathymetry <<<<
20122012

20132013
if not bare: # Add colorbar with label
2014-
cbar = plt.colorbar(contourf, ax=ax, fraction=0.04, label='Water Depth (m)')
2014+
import matplotlib.ticker as tkr
2015+
cbar = plt.colorbar(contourf, ax=ax, fraction=0.04, label='Water Depth (m)', format=tkr.FormatStrFormatter('%.0f'))
20152016
# if plot_seabed:
20162017
# if len(self.soil_x) > 1 and len(self.soil_y) > 1:
20172018
# sX, sY = np.meshgrid(self.soil_x, self.soil_y)

0 commit comments

Comments
 (0)