We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d7a39e4 + 00bbd00 commit 42d4f03Copy full SHA for 42d4f03
examples/text_labels_and_annotations/arrow_demo.py
@@ -110,14 +110,10 @@ def do_fontsize(k):
110
return float(np.clip(max_text_size * np.sqrt(data[k]),
111
min_text_size, max_text_size))
112
113
- A = plt.text(0, 1, '$A_3$', color='r', size=do_fontsize('A'),
114
- **text_params)
115
- T = plt.text(1, 1, '$T_3$', color='k', size=do_fontsize('T'),
116
117
- G = plt.text(0, 0, '$G_3$', color='g', size=do_fontsize('G'),
118
119
- C = plt.text(1, 0, '$C_3$', color='b', size=do_fontsize('C'),
120
+ plt.text(0, 1, '$A_3$', color='r', size=do_fontsize('A'), **text_params)
+ plt.text(1, 1, '$T_3$', color='k', size=do_fontsize('T'), **text_params)
+ plt.text(0, 0, '$G_3$', color='g', size=do_fontsize('G'), **text_params)
+ plt.text(1, 0, '$C_3$', color='b', size=do_fontsize('C'), **text_params)
121
122
arrow_h_offset = 0.25 # data coordinates, empirically determined
123
max_arrow_length = 1 - 2 * arrow_h_offset
lib/matplotlib/backends/backend_gtk3.py
@@ -364,7 +364,7 @@ def __init__(self, canvas, num):
364
self.toolbar = self._get_toolbar()
365
self.statusbar = None
366
367
- def add_widget(child, expand, fill, padding):
+ def add_widget(child):
368
child.show()
369
self.vbox.pack_end(child, False, False, 0)
370
size_request = child.size_request()
@@ -375,12 +375,12 @@ def add_widget(child, expand, fill, padding):
375
if self.toolbar:
376
backend_tools.add_tools_to_container(self.toolbar)
377
self.statusbar = StatusbarGTK3(self.toolmanager)
378
- h += add_widget(self.statusbar, False, False, 0)
379
- h += add_widget(Gtk.HSeparator(), False, False, 0)
+ h += add_widget(self.statusbar)
+ h += add_widget(Gtk.HSeparator())
380
381
if self.toolbar is not None:
382
self.toolbar.show()
383
- h += add_widget(self.toolbar, False, False, 0)
+ h += add_widget(self.toolbar)
384
385
self.window.set_default_size(w, h)
386
lib/matplotlib/backends/backend_pdf.py
@@ -1418,7 +1418,6 @@ def _unpack(self, im):
1418
``(height, width, 3)`` (RGB) or ``(height, width, 1)`` (grayscale or
1419
alpha), except that alpha is None if the image is fully opaque.
1420
"""
1421
- h, w = im.shape[:2]
1422
im = im[::-1]
1423
if im.ndim == 2:
1424
return im, None
lib/matplotlib/backends/backend_ps.py
@@ -299,8 +299,6 @@ def draw_image(self, gc, x, y, im, transform=None):
299
xscale = 1.0
300
yscale = 1.0
301
302
- figh = self.height * 72
303
-
304
bbox = gc.get_clip_rectangle()
305
clippath, clippath_trans = gc.get_clip_path()
306
lib/matplotlib/contour.py
@@ -1140,7 +1140,7 @@ def _autolev(self, N):
1140
1141
return lev[i0:i1]
1142
1143
- def _contour_level_args(self, z, args):
+ def _process_contour_level_args(self, args):
1144
1145
Determine the contour levels and store in self.levels.
1146
@@ -1484,7 +1484,7 @@ def _contour_args(self, args, kwargs):
1484
cbook._warn_external('Log scale: values of z <= 0 have been '
1485
'masked')
1486
self.zmin = float(z.min())
1487
- self._contour_level_args(z, args)
+ self._process_contour_level_args(args)
1488
return (x, y, z)
1489
1490
def _check_xyz(self, args, kwargs):
lib/matplotlib/tight_layout.py
@@ -90,8 +90,8 @@ def auto_adjust_subplotpars(
90
else:
91
margin_top = None
92
93
- vspaces = [[] for i in range((rows + 1) * cols)]
94
- hspaces = [[] for i in range(rows * (cols + 1))]
+ vspaces = [[] for _ in range((rows + 1) * cols)]
+ hspaces = [[] for _ in range(rows * (cols + 1))]
95
96
union = Bbox.union
97
lib/matplotlib/tri/tricontour.py
@@ -99,7 +99,7 @@ def _contour_args(self, args, kwargs):
99
self.zmin = float(z_check.min())
100
if self.logscale and self.zmin <= 0:
101
raise ValueError('Cannot %s log of negative values.' % fn)
102
- self._contour_level_args(z, args[1:])
+ self._process_contour_level_args(args[1:])
103
return (tri, z)
104
105
lib/matplotlib/type1font.py
@@ -291,7 +291,7 @@ def replacer(tokens):
291
return replacer
292
293
def suppress(tokens):
294
- for x in itertools.takewhile(lambda x: x[1] != b'def', tokens):
+ for _ in itertools.takewhile(lambda x: x[1] != b'def', tokens):
295
pass
296
yield b''
297
lib/mpl_toolkits/axes_grid1/colorbar.py
@@ -386,7 +386,7 @@ def __init__(self, ax,
elif ticks is not None:
387
self.cbar_axis.set_major_locator(ticks)
388
389
- self._select_locator(formatter)
+ self._select_locator()
390
391
self._config_axes()
392
@@ -563,7 +563,7 @@ def add_lines(self, levels, colors, linewidths):
563
col.set_color(colors)
564
self.ax.add_collection(col)
565
566
- def _select_locator(self, formatter):
+ def _select_locator(self):
567
"""Select a suitable locator."""
568
if self.boundaries is None:
569
if isinstance(self.norm, colors.NoNorm):
0 commit comments