From 666d9727b2e2381b757f00391c2acded0ee1561b Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 8 Apr 2017 20:06:00 -0400 Subject: [PATCH] DOC: tweak API usage The updated version on the master branch uses a feature which does not exist on 2.0.x --- doc/users/plotting/colormaps/lightness.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/users/plotting/colormaps/lightness.py b/doc/users/plotting/colormaps/lightness.py index 8addfa6e52b4..aa413bba530b 100644 --- a/doc/users/plotting/colormaps/lightness.py +++ b/doc/users/plotting/colormaps/lightness.py @@ -40,7 +40,7 @@ # squeeze=False to handle similarly the case of a single subplot fig, axes = plt.subplots(nrows=nsubplots, squeeze=False, - figsize=(7, 2.6*nsubplots)) + figsize=(7, 2.6*nsubplots)) for i, ax in enumerate(axes.flat): @@ -90,7 +90,8 @@ ax.xaxis.set_major_locator(ticker) formatter = mpl.ticker.FixedFormatter(cmap_list[i*dsub:(i+1)*dsub]) ax.xaxis.set_major_formatter(formatter) - ax.xaxis.set_tick_params(rotation=50) + for label in ax.get_xticklabels(): + label.set_rotation(50) ax.set_xlabel(cmap_category + ' colormaps', fontsize=14) fig.text(0.0, 0.55, 'Lightness $L^*$', fontsize=12,