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

Skip to content

Use bool for bool keyword arguments #22821

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
merged 1 commit into from
Apr 11, 2022
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
2 changes: 1 addition & 1 deletion doc/users/next_whats_new/custom_cap_widths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ widths of the caps in box and whisker plots.
x = np.linspace(-7, 7, 140)
x = np.hstack([-25, x, 25])
fig, ax = plt.subplots()
ax.boxplot([x, x], notch=1, capwidths=[0.01, 0.2])
ax.boxplot([x, x], notch=True, capwidths=[0.01, 0.2])
plt.show()
6 changes: 3 additions & 3 deletions examples/statistics/boxplot_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
fig.canvas.manager.set_window_title('A Boxplot Example')
fig.subplots_adjust(left=0.075, right=0.95, top=0.9, bottom=0.25)

bp = ax1.boxplot(data, notch=0, sym='+', vert=1, whis=1.5)
bp = ax1.boxplot(data, notch=False, sym='+', vert=True, whis=1.5)
plt.setp(bp['boxes'], color='black')
plt.setp(bp['whiskers'], color='black')
plt.setp(bp['fliers'], color='red', marker='+')
Expand Down Expand Up @@ -221,7 +221,7 @@ def fake_bootstrapper(n):
fig, ax = plt.subplots()
pos = np.arange(len(treatments)) + 1
bp = ax.boxplot(treatments, sym='k+', positions=pos,
notch=1, bootstrap=5000,
notch=True, bootstrap=5000,
usermedians=medians,
conf_intervals=conf_intervals)

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

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

plt.show()

Expand Down
2 changes: 1 addition & 1 deletion examples/user_interfaces/embedding_in_tk_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def update_frequency(new_val):
button_quit.pack(side=tkinter.BOTTOM)
slider_update.pack(side=tkinter.BOTTOM)
toolbar.pack(side=tkinter.BOTTOM, fill=tkinter.X)
canvas.get_tk_widget().pack(side=tkinter.TOP, fill=tkinter.BOTH, expand=1)
canvas.get_tk_widget().pack(side=tkinter.TOP, fill=tkinter.BOTH, expand=True)

tkinter.mainloop()
2 changes: 1 addition & 1 deletion tutorials/introductory/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def f(t):
x = mu + sigma * np.random.randn(10000)

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


plt.xlabel('Smarts')
Expand Down
2 changes: 1 addition & 1 deletion tutorials/introductory/quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def my_plotter(ax, data1, data2, param_dict):
x = mu + sigma * np.random.randn(10000)
fig, ax = plt.subplots(figsize=(5, 2.7), layout='constrained')
# the histogram of the data
n, bins, patches = ax.hist(x, 50, density=1, facecolor='C0', alpha=0.75)
n, bins, patches = ax.hist(x, 50, density=True, facecolor='C0', alpha=0.75)

ax.set_xlabel('Length [cm]')
ax.set_ylabel('Probability')
Expand Down