Skip to content

Commit

Permalink
minor improvements - labels & layout
Browse files Browse the repository at this point in the history
  • Loading branch information
chowland committed Sep 19, 2023
1 parent 62263dc commit 63ddfd7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/parallel_movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
)

# Add a colorbar
cb = fig.colorbar(pc, ax=[ax], label="$\\theta$")
cb = fig.colorbar(pc, ax=[ax], label="$\\theta/\Delta$")

# Add axis labels and fix aspect ratio
ax.set(
aspect='equal',
xlabel='$x$',
ylabel='$z$'
xlabel='$x/H$',
ylabel='$z/H$'
)

# Rescale the output image so that the resolution of the image matches the simulation
Expand All @@ -64,10 +64,11 @@ def update_and_save_plot(idx):
with h5py.File(simdir+'/outputdir/flowmov/movie_zcut.h5', 'r') as f:
nmov = len(list(f[var].keys()))

fig.canvas.draw()
fig.set_layout_engine('none')

# Create a multiprocessing pool to split up the work
pool = mp.Pool()
# Create a multiprocessing pool to split up the work on 4 processors
pool = mp.Pool(4)
# Save plots for all of the
pool.map(update_and_save_plot, range(nmov))

Expand Down

0 comments on commit 63ddfd7

Please sign in to comment.