Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit984f5d6

Browse files
authored
Merge pull request#16806 from meeseeksmachine/auto-backport-of-pr-16803-on-v3.2.0-doc
Backport PR#16803 on branch v3.2.0-doc (Fix some doc issues)
2 parentsf8ad3a5 +03e6854 commit984f5d6

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

‎examples/scales/log_bar.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
y= [d[i]fordindata]
2121
b=ax.bar(x+i*dimw,y,dimw,bottom=0.001)
2222

23-
ax.set_xticks(x+dimw/2,map(str,x))
23+
ax.set_xticks(x+dimw/2)
24+
ax.set_xticklabels(map(str,x))
2425
ax.set_yscale('log')
2526

2627
ax.set_xlabel('x')

‎examples/text_labels_and_annotations/text_rotation.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,20 @@ def addtext(ax, props):
3030
forxinrange(0,5):
3131
ax.scatter(x+0.5,0.5,color='r',alpha=0.5)
3232
ax.set_yticks([0,.5,1])
33+
ax.set_xticks(np.arange(0,5.1,0.5))
3334
ax.set_xlim(0,5)
3435
ax.grid(True)
3536

3637

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

40-
fig,axs=plt.subplots(2,1)
41+
fig,axs=plt.subplots(2,1,sharex=True)
4142

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

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

5049
plt.show()

‎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 ofmatplotlib colormaps
228+
# Lightness ofMatplotlib 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)

[8]ページ先頭

©2009-2025 Movatter.jp