VOOZH about

URL: https://www.geeksforgeeks.org/python/matplotlib-axis-tick-get_clip_box-in-python/

⇱ Matplotlib.axis.Tick.get_clip_box() in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Matplotlib.axis.Tick.get_clip_box() in Python

Last Updated : 15 Jul, 2025

Matplotlib is a library in Python and it is a  numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack.

matplotlib.axis.Tick.get_clip_box() Function

The Tick.get_clip_box() function in the axis module of matplotlib library is used to get the clipbox.

Syntax: Tick.get_clip_box(self) 

Parameters: This method does not accepts any parameter. 

Return value: This method return the clipbox.

Below examples illustrate the matplotlib.axis.Tick.get_clip_box() function in matplotlib.axis: 

Example 1: 

Output: 

Value Return by get_clip_box()
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
👁 Image
 

Example 2: 

Output: 

Value Return by get_clip_box()
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
TransformedBbox(
 Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),
 BboxTransformTo(
 TransformedBbox(
 Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),
 Affine2D(
 [[100. 0. 0.]
 [ 0. 100. 0.]
 [ 0. 0. 1.]]))))
👁 Image
 
Comment