Skip to content

Backport PR #16803 on branch v3.2.0-doc (Fix some doc issues) #16806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/scales/log_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
y = [d[i] for d in data]
b = ax.bar(x + i * dimw, y, dimw, bottom=0.001)

ax.set_xticks(x + dimw / 2, map(str, x))
ax.set_xticks(x + dimw / 2)
ax.set_xticklabels(map(str, x))
ax.set_yscale('log')

ax.set_xlabel('x')
Expand Down
5 changes: 2 additions & 3 deletions examples/text_labels_and_annotations/text_rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,20 @@ def addtext(ax, props):
for x in range(0, 5):
ax.scatter(x + 0.5, 0.5, color='r', alpha=0.5)
ax.set_yticks([0, .5, 1])
ax.set_xticks(np.arange(0, 5.1, 0.5))
ax.set_xlim(0, 5)
ax.grid(True)


# the text bounding box
bbox = {'fc': '0.8', 'pad': 0}

fig, axs = plt.subplots(2, 1)
fig, axs = plt.subplots(2, 1, sharex=True)

addtext(axs[0], {'ha': 'center', 'va': 'center', 'bbox': bbox})
axs[0].set_xticks(np.arange(0, 5.1, 0.5), [])
axs[0].set_ylabel('center / center')

addtext(axs[1], {'ha': 'left', 'va': 'bottom', 'bbox': bbox})
axs[1].set_xticks(np.arange(0, 5.1, 0.5))
axs[1].set_ylabel('left / bottom')

plt.show()
5 changes: 2 additions & 3 deletions tutorials/colors/colormaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def plot_color_gradients(cmap_category, cmap_list, nrows):
plt.show()

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

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

fig.tight_layout(h_pad=0.0, pad=1.5)
plt.show()
Expand Down