MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _init_props

Method _init_props

lib/matplotlib/widgets.py:1321–1358  ·  view source on GitHub ↗
(self, text_size, actives, frame_props, check_props)

Source from the content-addressed store, hash-verified

1319 frame_props=frame_props, check_props=check_props)
1320
1321 def _init_props(self, text_size, actives, frame_props, check_props):
1322 frame_props = {
1323 's': text_size**2,
1324 'linewidth': 1,
1325 **cbook.normalize_kwargs(frame_props, collections.PathCollection),
1326 'marker': 's',
1327 'transform': self.ax.transAxes,
1328 }
1329 frame_props.setdefault('facecolor', frame_props.get('color', 'none'))
1330 frame_props.setdefault('edgecolor', frame_props.pop('color', 'black'))
1331 self._frames = self.ax.scatter(
1332 self._buttons_xs,
1333 self._buttons_ys,
1334 **frame_props,
1335 )
1336 check_props = {
1337 'linewidth': 1,
1338 's': text_size**2,
1339 **cbook.normalize_kwargs(check_props, collections.PathCollection),
1340 'marker': 'x',
1341 'transform': self.ax.transAxes,
1342 'animated': self._useblit and self.canvas.supports_blit,
1343 # TODO: This may need an update when switching out the canvas.
1344 # Can set this to `_useblit` only and live with the animated=True
1345 # overhead on unsupported backends.
1346 }
1347 check_props.setdefault('facecolor', check_props.pop('color', 'black'))
1348 self._buttons = self.ax.scatter(
1349 self._buttons_xs,
1350 self._buttons_ys,
1351 **check_props
1352 )
1353 if actives is None:
1354 actives = [False] * len(self.labels)
1355 # The user may have passed custom colours in check_props, so we need to
1356 # create the checks (above), and modify the visibility after getting
1357 # whatever the user set.
1358 self._init_status(actives)
1359
1360 def set_frame_props(self, props):
1361 """

Callers

nothing calls this directly

Calls 4

_init_statusMethod · 0.95
getMethod · 0.45
popMethod · 0.45
scatterMethod · 0.45

Tested by

no test coverage detected