Skip to content

Commit

Permalink
filter axis title overwrite to only non-colorbar axes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Mar 6, 2024
1 parent 2117f5f commit 7055b6b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions aerosandbox/tools/pretty_plots/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,12 @@ def __call__(self):
# Make axis labels if needed
if xlabel is not None:
for ax in axes:
ax.set_xlabel(xlabel)
if not ax.get_label() == '<colorbar>':
ax.set_xlabel(xlabel)
if ylabel is not None:
for ax in axes:
ax.set_ylabel(ylabel)
if not ax.get_label() == '<colorbar>':
ax.set_ylabel(ylabel)
if zlabel is not None:
if len(axes_with_3D) == 0:
import warnings
Expand All @@ -341,7 +343,8 @@ def __call__(self):
)

for ax in axes_with_3D:
ax.set_zlabel(zlabel)
if not ax.get_label() == '<colorbar>':
ax.set_zlabel(zlabel)

# Rotate axis labels if needed
if rotate_axis_labels:
Expand Down

0 comments on commit 7055b6b

Please sign in to comment.