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

Method update_from_data_x

lib/matplotlib/transforms.py:933–951  ·  view source on GitHub ↗

Update the x-bounds of the `Bbox` based on the passed in data. After updating, the bounds will have positive *width*, and *x0* will be the minimal value. Parameters ---------- x : `~numpy.ndarray` Array of x-values. ignore : bool,

(self, x, ignore=None)

Source from the content-addressed store, hash-verified

931 self._minpos[1] = minpos[1]
932
933 def update_from_data_x(self, x, ignore=None):
934 """
935 Update the x-bounds of the `Bbox` based on the passed in data. After
936 updating, the bounds will have positive *width*, and *x0* will be the
937 minimal value.
938
939 Parameters
940 ----------
941 x : `~numpy.ndarray`
942 Array of x-values.
943 ignore : bool, optional
944 - When ``True``, ignore the existing bounds of the `Bbox`.
945 - When ``False``, include the existing bounds of the `Bbox`.
946 - When ``None``, use the last value passed to :meth:`ignore`.
947 """
948 x = np.ravel(x)
949 # The y-component in np.array([x, *y*]).T is not used. We simply pass
950 # x again to not spend extra time on creating an array of unused data
951 self.update_from_data_xy(np.array([x, x]).T, ignore=ignore, updatey=False)
952
953 def update_from_data_y(self, y, ignore=None):
954 """

Callers 1

auto_scale_xyzMethod · 0.80

Calls 1

update_from_data_xyMethod · 0.95

Tested by

no test coverage detected