Verified Commit fa6450f9 authored by Renato Alves's avatar Renato Alves 🌱
Browse files

Remove unnecessary .flatten() calls

parent f9fc45bb
Pipeline #16615 passed with stage
in 20 seconds
......@@ -451,11 +451,13 @@ for ax in axes.flatten():
ax.legend()
# But we only need to set X labels on the bottom-most panels
for ax in axes[1, :].flatten():
# We don't need to use .flatten() here because axes[1, :] returns a 1D array
for ax in axes[1, :]:
ax.set_xlabel("x label")
# And Y labels on the left-most panels
for ax in axes[:, 0].flatten():
# We don't need to use .flatten() here either because axes[:, 0] returns a 1D array
for ax in axes[:, 0]:
ax.set_ylabel("y label")
# Finally, each Axes can have a title but the Figure can also have a "super title"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment