Skip to content

Do not use aliases of properties in internal code #11940

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
Aug 26, 2018
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
4 changes: 2 additions & 2 deletions examples/axes_grid1/demo_axes_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def demo_rgb2():
for sp1 in ax1.spines.values():
sp1.set_color("w")
for tick in ax1.xaxis.get_major_ticks() + ax1.yaxis.get_major_ticks():
tick.tick1line.set_mec("w")
tick.tick2line.set_mec("w")
tick.tick1line.set_markeredgecolor("w")
tick.tick2line.set_markeredgecolor("w")

return ax

Expand Down
2 changes: 1 addition & 1 deletion examples/misc/svg_filter_pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
w.set_gid(w.get_label())

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

for w in pies[0]:
# create shadow patch
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
if mtext and (
(angle == 0 or
mtext.get_rotation_mode() == "anchor") and
mtext.get_va() != "center_baseline"):
mtext.get_verticalalignment() != "center_baseline"):
# if text anchoring can be supported, get the original coordinates
# and add alignment information
pos = mtext.get_unitless_position()
Expand All @@ -694,8 +694,8 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
halign = {"left": "left", "right": "right", "center": ""}
valign = {"top": "top", "bottom": "bottom",
"baseline": "base", "center": ""}
text_args.append(halign[mtext.get_ha()])
text_args.append(valign[mtext.get_va()])
text_args.append(halign[mtext.get_horizontalalignment()])
text_args.append(valign[mtext.get_verticalalignment()])
else:
# if not, use the text layout provided by matplotlib
text_args.append("x=%fin" % (x * f))
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def get_facecolor(self):

def get_edgecolor(self):
if cbook._str_equal(self._edgecolors, 'face'):
return self.get_facecolors()
return self.get_facecolor()
else:
return self._edgecolors

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def __init__(self,
xy=(0, 0), width=1, height=1,
facecolor=facecolor, edgecolor=edgecolor, linewidth=linewidth)
self._set_artist_props(self.patch)
self.patch.set_aa(False)
self.patch.set_antialiased(False)

self.canvas = None
self._suptitle = None
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ def update_position(self, loc):
text_angle = user_angle
if self.label1On:
if full:
ha = self.label1.get_ha()
va = self.label1.get_va()
ha = self.label1.get_horizontalalignment()
va = self.label1.get_verticalalignment()
else:
ha, va = self._determine_anchor(mode, angle, direction > 0)
self.label1.set_ha(ha)
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def test_shadow(fig_test, fig_ref):
rect = mpatches.Rectangle(xy=xy, width=.5, height=.5)
shadow = mpatches.Rectangle(
xy=xy + fig_ref.dpi / 72 * dxy, width=.5, height=.5,
fc=np.asarray(mcolors.to_rgb(rect.get_fc())) * .3,
ec=np.asarray(mcolors.to_rgb(rect.get_fc())) * .3,
fc=np.asarray(mcolors.to_rgb(rect.get_facecolor())) * .3,
ec=np.asarray(mcolors.to_rgb(rect.get_facecolor())) * .3,
alpha=.5)
a2.add_patch(shadow)
a2.add_patch(rect)
4 changes: 2 additions & 2 deletions lib/mpl_toolkits/axes_grid1/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,12 @@ def _add_solids(self, X, Y, C):

if self.extend in ["min", "both"]:
cc = self.to_rgba([C[0][0]])
self.extension_patch1.set_fc(cc[0])
self.extension_patch1.set_facecolor(cc[0])
X, Y, C = X[1:], Y[1:], C[1:]

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

if self.orientation == 'vertical':
Expand Down