Skip to content

Commit c02998f

Browse files
committed
Address review comment
1 parent c9b2dea commit c02998f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

ratapi/utils/plotting.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,16 +1016,14 @@ def panel_plot_helper(
10161016
fig.clf()
10171017
fig.subplots(nrows, ncols, subplot_kw={"visible": False})
10181018
axs = fig.get_axes()
1019-
current_plot = 0
1020-
for plot_num, index in enumerate(indices):
1021-
axs[plot_num].tick_params(which="both", labelsize="medium")
1022-
axs[plot_num].xaxis.offsetText.set_fontsize("small")
1023-
axs[plot_num].yaxis.offsetText.set_fontsize("small")
1024-
axs[plot_num].set_visible(True)
1025-
plot_func(axs[plot_num], index)
1019+
for index, plot_num in enumerate(indices):
1020+
axs[index].tick_params(which="both", labelsize="medium")
1021+
axs[index].xaxis.offsetText.set_fontsize("small")
1022+
axs[index].yaxis.offsetText.set_fontsize("small")
1023+
axs[index].set_visible(True)
1024+
plot_func(axs[index], plot_num)
10261025
if progress_callback is not None:
1027-
current_plot += 1
1028-
progress_callback(current_plot, nplots)
1026+
progress_callback(index, nplots)
10291027

10301028
fig.tight_layout()
10311029
return fig

0 commit comments

Comments
 (0)