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

Method scaled

lib/matplotlib/markers.py:426–446  ·  view source on GitHub ↗

Return new marker scaled by specified scale factors. If *sy* is not given, the same scale is applied in both the *x*- and *y*-directions. Parameters ---------- sx : float *X*-direction scaling factor. sy : float, optional

(self, sx, sy=None)

Source from the content-addressed store, hash-verified

424 return new_marker
425
426 def scaled(self, sx, sy=None):
427 """
428 Return new marker scaled by specified scale factors.
429
430 If *sy* is not given, the same scale is applied in both the *x*- and
431 *y*-directions.
432
433 Parameters
434 ----------
435 sx : float
436 *X*-direction scaling factor.
437 sy : float, optional
438 *Y*-direction scaling factor.
439 """
440 if sy is None:
441 sy = sx
442
443 new_marker = MarkerStyle(self)
444 _transform = new_marker._user_transform or Affine2D()
445 new_marker._user_transform = _transform.scale(sx, sy)
446 return new_marker
447
448 def _set_nothing(self):
449 self._filled = False

Callers 1

test_marker_scaledFunction · 0.95

Calls 3

MarkerStyleClass · 0.85
Affine2DClass · 0.85
scaleMethod · 0.45

Tested by 1

test_marker_scaledFunction · 0.76