Skip to content
Snippets Groups Projects
Commit bbaacaa2 authored by Philipp Niedermayer's avatar Philipp Niedermayer
Browse files

Labeling

parent da84369c
No related branches found
No related tags found
No related merge requests found
...@@ -73,11 +73,14 @@ def subplot_shared_labels(axes, xlabel=None, ylabel=None, clear=True): ...@@ -73,11 +73,14 @@ def subplot_shared_labels(axes, xlabel=None, ylabel=None, clear=True):
""" """
for r in range(axes.shape[0]): for r in range(axes.shape[0]):
for c in range(axes.shape[1]): for c in range(axes.shape[1]):
if clear: axes[r,c].set(xlabel=None, ylabel=None) if ylabel:
if c == 0 or not axes[r,c].get_shared_y_axes().joined(axes[r,c], axes[r,0]): if clear: axes[r,c].set(ylabel=None)
axes[r,c].set(ylabel=ylabel) if c == 0 or not axes[r,c].get_shared_y_axes().joined(axes[r,c], axes[r,0]):
if r == axes.shape[0]-1 or not axes[r,c].get_shared_x_axes().joined(axes[r,c], axes[-1,c]): axes[r,c].set(ylabel=ylabel)
axes[r,c].set(xlabel=xlabel) if xlabel:
if clear: axes[r,c].set(xlabel=None)
if r == axes.shape[0]-1 or not axes[r,c].get_shared_x_axes().joined(axes[r,c], axes[-1,c]):
axes[r,c].set(xlabel=xlabel)
def grid_diagonal(ax, **kwargs): def grid_diagonal(ax, **kwargs):
for k, v in dict(color='lightgray',lw=1,zorder=-100).items(): for k, v in dict(color='lightgray',lw=1,zorder=-100).items():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment