Mahmudm commited on
Commit
f31176e
·
verified ·
1 Parent(s): 928c17e

Update ash_animator/plot_horizontal_data.py

Browse files
ash_animator/plot_horizontal_data.py CHANGED
@@ -174,7 +174,7 @@ class Plot_Horizontal_Data:
174
 
175
  # Inside update() function:
176
  if not hasattr(update, "colorbar"):
177
- unit_label = f"{field}:({self.animator.datasets[0][field].attrs.get("units", field)})" #self.animator.datasets[0][field].attrs.get("units", field)
178
  update.colorbar = fig.colorbar(c, ax=[ax1, ax2], orientation='vertical', label=unit_label)
179
  formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
180
  update.colorbar.ax.yaxis.set_major_formatter(formatter)
 
174
 
175
  # Inside update() function:
176
  if not hasattr(update, "colorbar"):
177
+ unit_label = f"{field}:({self.animator.datasets[0][field].attrs.get('units', field)})" #self.animator.datasets[0][field].attrs.get("units", field)
178
  update.colorbar = fig.colorbar(c, ax=[ax1, ax2], orientation='vertical', label=unit_label)
179
  formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
180
  update.colorbar.ax.yaxis.set_major_formatter(formatter)