Spaces:
Sleeping
Sleeping
Upload 186 files
Browse files- app.py +1 -2
- ash_animator/plot_3dfield_data.py +1 -1
- ash_animator/plot_horizontal_data.py +2 -2
app.py
CHANGED
|
@@ -457,8 +457,7 @@ sidebar = pn.Column(
|
|
| 457 |
pn.Card(pn.Column(download_button, log_link, sizing_mode="stretch_width"),
|
| 458 |
title="๐ Downloads & Logs", collapsible=True, sizing_mode="stretch_width"),
|
| 459 |
pn.Card(status, title="๐ข Status", collapsible=True, sizing_mode="stretch_width"),
|
| 460 |
-
sizing_mode="stretch_width"
|
| 461 |
-
)
|
| 462 |
|
| 463 |
restore_previous_session()
|
| 464 |
|
|
|
|
| 457 |
pn.Card(pn.Column(download_button, log_link, sizing_mode="stretch_width"),
|
| 458 |
title="๐ Downloads & Logs", collapsible=True, sizing_mode="stretch_width"),
|
| 459 |
pn.Card(status, title="๐ข Status", collapsible=True, sizing_mode="stretch_width"),
|
| 460 |
+
sizing_mode="stretch_width")
|
|
|
|
| 461 |
|
| 462 |
restore_previous_session()
|
| 463 |
|
ash_animator/plot_3dfield_data.py
CHANGED
|
@@ -467,6 +467,6 @@ class Plot_3DField_Data:
|
|
| 467 |
formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
|
| 468 |
cbar.ax.yaxis.set_major_formatter(formatter)
|
| 469 |
frame_path = os.path.join(z_dir, f"frame_{t+1:04d}.jpg")
|
| 470 |
-
plt.savefig(frame_path,
|
| 471 |
plt.close(fig)
|
| 472 |
print(f"๐ธ Saved {frame_path}")
|
|
|
|
| 467 |
formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
|
| 468 |
cbar.ax.yaxis.set_major_formatter(formatter)
|
| 469 |
frame_path = os.path.join(z_dir, f"frame_{t+1:04d}.jpg")
|
| 470 |
+
plt.savefig(frame_path, bbox_inches='tight')
|
| 471 |
plt.close(fig)
|
| 472 |
print(f"๐ธ Saved {frame_path}")
|
ash_animator/plot_horizontal_data.py
CHANGED
|
@@ -181,7 +181,7 @@ class Plot_Horizontal_Data:
|
|
| 181 |
|
| 182 |
# Inside update() function:
|
| 183 |
if not hasattr(update, "colorbar"):
|
| 184 |
-
unit_label = f"{field}:({self.animator.datasets[0][field].attrs.get(
|
| 185 |
update.colorbar = fig.colorbar(c, ax=[ax1, ax2], orientation='vertical', label=unit_label)
|
| 186 |
formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
|
| 187 |
update.colorbar.ax.yaxis.set_major_formatter(formatter)
|
|
@@ -201,7 +201,7 @@ class Plot_Horizontal_Data:
|
|
| 201 |
frame_folder = os.path.join(self.output_dir, "frames", field)
|
| 202 |
os.makedirs(frame_folder, exist_ok=True)
|
| 203 |
frame_path = os.path.join(frame_folder, f"frame_{t+1:04d}.jpg")
|
| 204 |
-
plt.savefig(frame_path,
|
| 205 |
print(f"๐ผ๏ธ Saved static frame: {frame_path}")
|
| 206 |
|
| 207 |
return []
|
|
|
|
| 181 |
|
| 182 |
# Inside update() function:
|
| 183 |
if not hasattr(update, "colorbar"):
|
| 184 |
+
unit_label = f"{field}:({self.animator.datasets[0][field].attrs.get('units', field)})" #self.animator.datasets[0][field].attrs.get("units", field)
|
| 185 |
update.colorbar = fig.colorbar(c, ax=[ax1, ax2], orientation='vertical', label=unit_label)
|
| 186 |
formatter = mticker.FuncFormatter(lambda x, _: f'{x:.2g}')
|
| 187 |
update.colorbar.ax.yaxis.set_major_formatter(formatter)
|
|
|
|
| 201 |
frame_folder = os.path.join(self.output_dir, "frames", field)
|
| 202 |
os.makedirs(frame_folder, exist_ok=True)
|
| 203 |
frame_path = os.path.join(frame_folder, f"frame_{t+1:04d}.jpg")
|
| 204 |
+
plt.savefig(frame_path, bbox_inches='tight')
|
| 205 |
print(f"๐ผ๏ธ Saved static frame: {frame_path}")
|
| 206 |
|
| 207 |
return []
|