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

Commitad64412

Browse files
committed
Use bool for bool keyword arguments
1 parent33b3015 commitad64412

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

‎doc/users/next_whats_new/custom_cap_widths.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ widths of the caps in box and whisker plots.
1212
x = np.linspace(-7, 7, 140)
1313
x = np.hstack([-25, x, 25])
1414
fig, ax = plt.subplots()
15-
ax.boxplot([x, x], notch=1, capwidths=[0.01, 0.2])
15+
ax.boxplot([x, x], notch=True, capwidths=[0.01, 0.2])
1616
plt.show()

‎examples/statistics/boxplot_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
fig.canvas.manager.set_window_title('A Boxplot Example')
106106
fig.subplots_adjust(left=0.075,right=0.95,top=0.9,bottom=0.25)
107107

108-
bp=ax1.boxplot(data,notch=0,sym='+',vert=1,whis=1.5)
108+
bp=ax1.boxplot(data,notch=False,sym='+',vert=True,whis=1.5)
109109
plt.setp(bp['boxes'],color='black')
110110
plt.setp(bp['whiskers'],color='black')
111111
plt.setp(bp['fliers'],color='red',marker='+')
@@ -221,7 +221,7 @@ def fake_bootstrapper(n):
221221
fig,ax=plt.subplots()
222222
pos=np.arange(len(treatments))+1
223223
bp=ax.boxplot(treatments,sym='k+',positions=pos,
224-
notch=1,bootstrap=5000,
224+
notch=True,bootstrap=5000,
225225
usermedians=medians,
226226
conf_intervals=conf_intervals)
227227

@@ -239,7 +239,7 @@ def fake_bootstrapper(n):
239239
x=np.hstack([-25,x,25])
240240
fig,ax=plt.subplots()
241241

242-
ax.boxplot([x,x],notch=1,capwidths=[0.01,0.2])
242+
ax.boxplot([x,x],notch=True,capwidths=[0.01,0.2])
243243

244244
plt.show()
245245

‎examples/user_interfaces/embedding_in_tk_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ def update_frequency(new_val):
6262
button_quit.pack(side=tkinter.BOTTOM)
6363
slider_update.pack(side=tkinter.BOTTOM)
6464
toolbar.pack(side=tkinter.BOTTOM,fill=tkinter.X)
65-
canvas.get_tk_widget().pack(side=tkinter.TOP,fill=tkinter.BOTH,expand=1)
65+
canvas.get_tk_widget().pack(side=tkinter.TOP,fill=tkinter.BOTH,expand=True)
6666

6767
tkinter.mainloop()

‎tutorials/introductory/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def f(t):
327327
x=mu+sigma*np.random.randn(10000)
328328

329329
# the histogram of the data
330-
n,bins,patches=plt.hist(x,50,density=1,facecolor='g',alpha=0.75)
330+
n,bins,patches=plt.hist(x,50,density=True,facecolor='g',alpha=0.75)
331331

332332

333333
plt.xlabel('Smarts')

‎tutorials/introductory/quick_start.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def my_plotter(ax, data1, data2, param_dict):
288288
x=mu+sigma*np.random.randn(10000)
289289
fig,ax=plt.subplots(figsize=(5,2.7),layout='constrained')
290290
# the histogram of the data
291-
n,bins,patches=ax.hist(x,50,density=1,facecolor='C0',alpha=0.75)
291+
n,bins,patches=ax.hist(x,50,density=True,facecolor='C0',alpha=0.75)
292292

293293
ax.set_xlabel('Length [cm]')
294294
ax.set_ylabel('Probability')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp