Skip to content
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 examples/specialty_plots/radar_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _gen_axes_patch(self):

def _gen_axes_spines(self):
if frame == 'circle':
return PolarAxes._gen_axes_spines(self)
return super()._gen_axes_spines()
# The following is a hack to get the spines (i.e. the axes frame)
# to draw correctly for a polygon frame.

Expand Down
4 changes: 1 addition & 3 deletions examples/text_labels_and_annotations/demo_text_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def draw(self, renderer=None):

ax = plt.subplot(211)

from matplotlib._png import read_png
fn = get_sample_data("grace_hopper.png", asfileobj=False)
arr = read_png(fn)
arr = plt.imread(get_sample_data("grace_hopper.png"))

text_path = TextPath((0, 0), "!?", size=150)
p = PathClippedImagePatch(text_path, arr, ec="k",
Expand Down
6 changes: 4 additions & 2 deletions examples/text_labels_and_annotations/rainbow_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ def rainbow_text(x, y, strings, colors, ax=None, **kw):
text = ax.text(x, y, s + " ", color=c, transform=t, **kw)
text.draw(canvas.get_renderer())
ex = text.get_window_extent()
t = transforms.offset_copy(text._transform, x=ex.width, units='dots')
t = transforms.offset_copy(
text.get_transform(), x=ex.width, units='dots')

# vertical version
for s, c in zip(strings, colors):
text = ax.text(x, y, s + " ", color=c, transform=t,
rotation=90, va='bottom', ha='center', **kw)
text.draw(canvas.get_renderer())
ex = text.get_window_extent()
t = transforms.offset_copy(text._transform, y=ex.height, units='dots')
t = transforms.offset_copy(
text.get_transform(), y=ex.height, units='dots')


rainbow_text(0, 0, "all unicorns poop rainbows ! ! !".split(),
Expand Down
1 change: 0 additions & 1 deletion examples/widgets/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def set_extent(self, x, y, w, h):
self.label.ox = x + self.padx
self.label.oy = y - self.depth + self.pady/2.

self.rect._update_patch_transform()
self.hover = False

def draw(self, renderer):
Expand Down