@@ -902,11 +902,51 @@ def update_from_path(self, path, ignore=None, updatex=True, updatey=True):
902
902
self ._points [:, 1 ] = points [:, 1 ]
903
903
self ._minpos [1 ] = minpos [1 ]
904
904
905
+ def update_from_data_x (self , x , ignore = None ):
906
+ """
907
+ Update the x-bounds of the `Bbox` based on the passed in data. After
908
+ updating, the bounds will have positive *width*, and *x0* will be the
909
+ minimal value.
910
+
911
+ Parameters
912
+ ----------
913
+ x : ndarray
914
+ Array of x-values.
915
+
916
+ ignore : bool, optional
917
+ - When ``True``, ignore the existing bounds of the `Bbox`.
918
+ - When ``False``, include the existing bounds of the `Bbox`.
919
+ - When ``None``, use the last value passed to :meth:`ignore`.
920
+ """
921
+ x = np .ravel (x )
922
+ self .update_from_data_xy (np .column_stack ([x , np .ones (x .size )]),
923
+ ignore = ignore , updatey = False )
924
+
925
+ def update_from_data_y (self , y , ignore = None ):
926
+ """
927
+ Update the y-bounds of the `Bbox` based on the passed in data. After
928
+ updating, the bounds will have positive *height*, and *y0* will be the
929
+ minimal value.
930
+
931
+ Parameters
932
+ ----------
933
+ y : ndarray
934
+ Array of y-values.
935
+
936
+ ignore : bool, optional
937
+ - When ``True``, ignore the existing bounds of the `Bbox`.
938
+ - When ``False``, include the existing bounds of the `Bbox`.
939
+ - When ``None``, use the last value passed to :meth:`ignore`.
940
+ """
941
+ y = np .array (y ).ravel ()
942
+ self .update_from_data_xy (np .column_stack ([np .ones (y .size ), y ]),
943
+ ignore = ignore , updatex = False )
944
+
905
945
def update_from_data_xy (self , xy , ignore = None , updatex = True , updatey = True ):
906
946
"""
907
- Update the bounds of the `Bbox` based on the passed in
908
- data. After updating, the bounds will have positive *width*
909
- and *height*; *x0* and *y0* will be the minimal values.
947
+ Update the bounds of the `Bbox` based on the passed in data. After
948
+ updating, the bounds will have positive *width* and *height*;
949
+ *x0* and *y0* will be the minimal values.
910
950
911
951
Parameters
912
952
----------
0 commit comments