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

Appearance settings

Commit e7ce925

Browse filesBrowse files
authored
Merge branch 'matplotlib:master' into patch-2
2 parents b9b5956 + 9385642 commit e7ce925
Copy full SHA for e7ce925

File tree

Expand file treeCollapse file tree

7 files changed

+16
-22
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+16
-22
lines changed

‎examples/axes_grid1/demo_axes_divider.py

Copy file name to clipboardExpand all lines: examples/axes_grid1/demo_axes_divider.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def demo_simple_image(ax):
2222

2323
im = ax.imshow(Z, extent=extent)
2424
cb = plt.colorbar(im)
25-
plt.setp(cb.ax.get_yticklabels(), visible=False)
25+
cb.ax.yaxis.set_tick_params(labelright=False)
2626

2727

2828
def demo_locatable_axes_hard(fig):
@@ -60,7 +60,7 @@ def demo_locatable_axes_hard(fig):
6060

6161
im = ax.imshow(Z, extent=extent)
6262
plt.colorbar(im, cax=ax_cb)
63-
plt.setp(ax_cb.get_yticklabels(), visible=False)
63+
ax_cb.yaxis.set_tick_params(labelright=False)
6464

6565

6666
def demo_locatable_axes_easy(ax):

‎examples/axes_grid1/inset_locator_demo2.py

Copy file name to clipboardExpand all lines: examples/axes_grid1/inset_locator_demo2.py
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def get_demo_image():
3232
# fix the number of ticks on the inset axes
3333
axins.yaxis.get_major_locator().set_params(nbins=7)
3434
axins.xaxis.get_major_locator().set_params(nbins=7)
35-
36-
plt.setp(axins.get_xticklabels(), visible=False)
37-
plt.setp(axins.get_yticklabels(), visible=False)
35+
axins.tick_params(labelleft=False, labelbottom=False)
3836

3937

4038
def add_sizebar(ax, size):
@@ -69,9 +67,7 @@ def add_sizebar(ax, size):
6967
# fix the number of ticks on the inset axes
7068
axins2.yaxis.get_major_locator().set_params(nbins=7)
7169
axins2.xaxis.get_major_locator().set_params(nbins=7)
72-
73-
plt.setp(axins2.get_xticklabels(), visible=False)
74-
plt.setp(axins2.get_yticklabels(), visible=False)
70+
axins2.tick_params(labelleft=False, labelbottom=False)
7571

7672
# draw a bbox of the region of the inset axes in the parent axes and
7773
# connecting lines between the bbox and the inset axes area

‎examples/event_handling/ginput_manual_clabel_sgskip.py

Copy file name to clipboardExpand all lines: examples/event_handling/ginput_manual_clabel_sgskip.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ def tellme(s):
2727
# Define a triangle by clicking three points
2828

2929

30-
plt.clf()
31-
plt.setp(plt.gca(), autoscale_on=False)
30+
plt.figure()
31+
plt.xlim(0, 1)
32+
plt.ylim(0, 1)
3233

3334
tellme('You will define a triangle, click to begin')
3435

‎examples/images_contours_and_fields/contour_demo.py

Copy file name to clipboardExpand all lines: examples/images_contours_and_fields/contour_demo.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@
8585
linewidths=2, extent=(-3, 3, -2, 2))
8686

8787
# Thicken the zero contour.
88-
zc = CS.collections[6]
89-
plt.setp(zc, linewidth=4)
88+
CS.collections[6].set_linewidth(4)
9089

9190
ax.clabel(CS, levels[1::2], # label every second level
9291
inline=True, fmt='%1.1f', fontsize=14)

‎examples/subplots_axes_and_figures/shared_axis_demo.py

Copy file name to clipboardExpand all lines: examples/subplots_axes_and_figures/shared_axis_demo.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242

4343
ax1 = plt.subplot(311)
4444
plt.plot(t, s1)
45-
plt.setp(ax1.get_xticklabels(), fontsize=6)
45+
plt.tick_params('x', labelsize=6)
4646

4747
# share x only
4848
ax2 = plt.subplot(312, sharex=ax1)
4949
plt.plot(t, s2)
5050
# make these tick labels invisible
51-
plt.setp(ax2.get_xticklabels(), visible=False)
51+
plt.tick_params('x', labelbottom=False)
5252

5353
# share x and y
5454
ax3 = plt.subplot(313, sharex=ax1, sharey=ax1)

‎examples/ticks_and_spines/date_precision_and_epochs.py

Copy file name to clipboardExpand all lines: examples/ticks_and_spines/date_precision_and_epochs.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _reset_epoch_for_tutorial():
131131
fig, ax = plt.subplots(constrained_layout=True)
132132
ax.plot(xold, y)
133133
ax.set_title('Epoch: ' + mdates.get_epoch())
134-
plt.setp(ax.xaxis.get_majorticklabels(), rotation=40)
134+
ax.xaxis.set_tick_params(rotation=40)
135135
plt.show()
136136

137137
#############################################################################
@@ -140,7 +140,7 @@ def _reset_epoch_for_tutorial():
140140
fig, ax = plt.subplots(constrained_layout=True)
141141
ax.plot(x, y)
142142
ax.set_title('Epoch: ' + mdates.get_epoch())
143-
plt.setp(ax.xaxis.get_majorticklabels(), rotation=40)
143+
ax.xaxis.set_tick_params(rotation=40)
144144
plt.show()
145145

146146
_reset_epoch_for_tutorial() # Don't do this. Just for this tutorial.

‎lib/matplotlib/tests/test_polar.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_polar.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,13 @@ def test_polar_interpolation_steps_constant_r(fig_test, fig_ref):
322322
# Check that an extra half-turn doesn't make any difference -- modulo
323323
# antialiasing, which we disable here.
324324
p1 = (fig_test.add_subplot(121, projection="polar")
325-
.bar([0], [1], 3*np.pi, edgecolor="none"))
325+
.bar([0], [1], 3*np.pi, edgecolor="none", antialiased=False))
326326
p2 = (fig_test.add_subplot(122, projection="polar")
327-
.bar([0], [1], -3*np.pi, edgecolor="none"))
327+
.bar([0], [1], -3*np.pi, edgecolor="none", antialiased=False))
328328
p3 = (fig_ref.add_subplot(121, projection="polar")
329-
.bar([0], [1], 2*np.pi, edgecolor="none"))
329+
.bar([0], [1], 2*np.pi, edgecolor="none", antialiased=False))
330330
p4 = (fig_ref.add_subplot(122, projection="polar")
331-
.bar([0], [1], -2*np.pi, edgecolor="none"))
332-
for p in [p1, p2, p3, p4]:
333-
plt.setp(p, antialiased=False)
331+
.bar([0], [1], -2*np.pi, edgecolor="none", antialiased=False))
334332

335333

336334
@check_figures_equal(extensions=["png"])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.