Skip to content

Commit 3e98566

Browse files
committed
doc: improved plot in plot_halo
1 parent 3df1b76 commit 3e98566

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

examples/plot_halo.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,15 @@ def local_extent_from_slice(local_shape, local_slice, halo):
622622
# Let's display the results
623623

624624
if rank == 0:
625-
fig, axs = plt.subplots(2, 2, figsize=(14, 12))
626-
axs[0, 0].imshow(y_dist, cmap="gray", vmin=1, vmax=1)
627-
axs[0, 1].imshow(y_dist - y, cmap="gray", vmin=.1, vmax=.1)
628-
axs[1, 0].imshow(xadj_dist, cmap="gray", vmin=1, vmax=1)
629-
axs[1, 1].imshow(xadj_dist - xadj, cmap="gray", vmin=.1, vmax=.1)
625+
fig, axs = plt.subplots(2, 2, sharex=True, sharey=True, figsize=(10, 8))
626+
axs[0, 0].imshow(y_dist, cmap="gray", vmin=-1, vmax=1)
627+
axs[0, 0].set_title("Forward")
628+
axs[0, 1].imshow(y_dist - y, cmap="gray", vmin=-.1, vmax=.1)
629+
axs[0, 1].set_title("Forward (distr. - serial)")
630+
axs[1, 0].imshow(xadj_dist, cmap="gray", vmin=-1, vmax=1)
631+
axs[1, 0].set_title("Adjoint")
632+
axs[1, 1].imshow(xadj_dist - xadj, cmap="gray", vmin=-.1, vmax=.1)
633+
axs[1, 1].set_title("Adjoint (distr. - serial)")
634+
for ax in axs.flatten():
635+
ax.axis("tight")
630636
fig.tight_layout()

0 commit comments

Comments
 (0)