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

Skip to content

Commit 87a639d

Browse files
authored
Merge pull request #11940 from timhoffm/no-internal-aliases
Do not use aliases of properties in internal code
2 parents 1444a85 + 879f03f commit 87a639d

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

examples/axes_grid1/demo_axes_rgb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def demo_rgb2():
7979
for sp1 in ax1.spines.values():
8080
sp1.set_color("w")
8181
for tick in ax1.xaxis.get_major_ticks() + ax1.yaxis.get_major_ticks():
82-
tick.tick1line.set_mec("w")
83-
tick.tick2line.set_mec("w")
82+
tick.tick1line.set_markeredgecolor("w")
83+
tick.tick2line.set_markeredgecolor("w")
8484

8585
return ax
8686

examples/misc/svg_filter_pie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
w.set_gid(w.get_label())
3232

3333
# we don't want to draw the edge of the pie
34-
w.set_ec("none")
34+
w.set_edgecolor("none")
3535

3636
for w in pies[0]:
3737
# create shadow patch

lib/matplotlib/backends/backend_pgf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
683683
if mtext and (
684684
(angle == 0 or
685685
mtext.get_rotation_mode() == "anchor") and
686-
mtext.get_va() != "center_baseline"):
686+
mtext.get_verticalalignment() != "center_baseline"):
687687
# if text anchoring can be supported, get the original coordinates
688688
# and add alignment information
689689
pos = mtext.get_unitless_position()
@@ -694,8 +694,8 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
694694
halign = {"left": "left", "right": "right", "center": ""}
695695
valign = {"top": "top", "bottom": "bottom",
696696
"baseline": "base", "center": ""}
697-
text_args.append(halign[mtext.get_ha()])
698-
text_args.append(valign[mtext.get_va()])
697+
text_args.append(halign[mtext.get_horizontalalignment()])
698+
text_args.append(valign[mtext.get_verticalalignment()])
699699
else:
700700
# if not, use the text layout provided by matplotlib
701701
text_args.append("x=%fin" % (x * f))

lib/matplotlib/collections.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ def get_facecolor(self):
691691

692692
def get_edgecolor(self):
693693
if cbook._str_equal(self._edgecolors, 'face'):
694-
return self.get_facecolors()
694+
return self.get_facecolor()
695695
else:
696696
return self._edgecolors
697697

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def __init__(self,
368368
xy=(0, 0), width=1, height=1,
369369
facecolor=facecolor, edgecolor=edgecolor, linewidth=linewidth)
370370
self._set_artist_props(self.patch)
371-
self.patch.set_aa(False)
371+
self.patch.set_antialiased(False)
372372

373373
self.canvas = None
374374
self._suptitle = None

lib/matplotlib/projections/polar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ def update_position(self, loc):
631631
text_angle = user_angle
632632
if self.label1On:
633633
if full:
634-
ha = self.label1.get_ha()
635-
va = self.label1.get_va()
634+
ha = self.label1.get_horizontalalignment()
635+
va = self.label1.get_verticalalignment()
636636
else:
637637
ha, va = self._determine_anchor(mode, angle, direction > 0)
638638
self.label1.set_ha(ha)

lib/matplotlib/tests/test_patches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ def test_shadow(fig_test, fig_ref):
463463
rect = mpatches.Rectangle(xy=xy, width=.5, height=.5)
464464
shadow = mpatches.Rectangle(
465465
xy=xy + fig_ref.dpi / 72 * dxy, width=.5, height=.5,
466-
fc=np.asarray(mcolors.to_rgb(rect.get_fc())) * .3,
467-
ec=np.asarray(mcolors.to_rgb(rect.get_fc())) * .3,
466+
fc=np.asarray(mcolors.to_rgb(rect.get_facecolor())) * .3,
467+
ec=np.asarray(mcolors.to_rgb(rect.get_facecolor())) * .3,
468468
alpha=.5)
469469
a2.add_patch(shadow)
470470
a2.add_patch(rect)

lib/mpl_toolkits/axes_grid1/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,12 @@ def _add_solids(self, X, Y, C):
536536

537537
if self.extend in ["min", "both"]:
538538
cc = self.to_rgba([C[0][0]])
539-
self.extension_patch1.set_fc(cc[0])
539+
self.extension_patch1.set_facecolor(cc[0])
540540
X, Y, C = X[1:], Y[1:], C[1:]
541541

542542
if self.extend in ["max", "both"]:
543543
cc = self.to_rgba([C[-1][0]])
544-
self.extension_patch2.set_fc(cc[0])
544+
self.extension_patch2.set_facecolor(cc[0])
545545
X, Y, C = X[:-1], Y[:-1], C[:-1]
546546

547547
if self.orientation == 'vertical':

0 commit comments

Comments
 (0)