Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea31477

Browse files
committed
DOC: Show Lightness label for every colormap Axes.
It's not really any clearer to have a single label per `Figure`, since in the docs every figure just appears one after the other. Fixes #16801.
1 parent 6925bf6 commit ea31477

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tutorials/colors/colormaps.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def plot_color_gradients(cmap_category, cmap_list, nrows):
225225
plt.show()
226226

227227
###############################################################################
228-
# Lightness of matplotlib colormaps
228+
# Lightness of Matplotlib colormaps
229229
# =================================
230230
#
231231
# Here we examine the lightness values of the matplotlib colormaps.
@@ -308,10 +308,9 @@ def plot_color_gradients(cmap_category, cmap_list, nrows):
308308
formatter = mpl.ticker.FixedFormatter(cmap_list[i*dsub:(i+1)*dsub])
309309
ax.xaxis.set_major_formatter(formatter)
310310
ax.xaxis.set_tick_params(rotation=50)
311+
ax.set_ylabel('Lightness $L^*$', fontsize=12)
311312

312313
ax.set_xlabel(cmap_category + ' colormaps', fontsize=14)
313-
fig.text(0.0, 0.55, 'Lightness $L^*$', fontsize=12,
314-
transform=fig.transFigure, rotation=90)
315314

316315
fig.tight_layout(h_pad=0.0, pad=1.5)
317316
plt.show()

0 commit comments

Comments
 (0)