def get_axes_bounds(fig):
 (x_min, x_max, y_min, y_max) = ([], [], [], [])
 for axes_obj in fig.get_axes():
  bounds = axes_obj.get_position().bounds
  x_min.append(bounds[0])
  x_max.append((bounds[0] + bounds[2]))
  y_min.append(bounds[1])
  y_max.append((bounds[1] + bounds[3]))
 (x_min, y_min, x_max, y_max) = (min(x_min), min(y_min), max(x_max), max(y_max))
 return ((x_min, x_max), (y_min, y_max))

def get_axes_bounds ( fig ) : ( x_min , x_max , y_min , y_max ) = ( [ ] , [ ] , [ ] , [ ] ) for axes_obj in fig . get_axes ( ) : bounds = axes_obj . get_position ( ) . bounds x_min . append ( bounds [ 0 ] ) x_max . append ( ( bounds [ 0 ] + bounds [ 2 ] ) ) y_min . append ( bounds [ 1 ] ) y_max . append ( ( bounds [ 1 ] + bounds [ 3 ] ) ) ( x_min , y_min , x_max , y_max ) = ( min ( x_min ) , min ( y_min ) , max ( x_max ) , max ( y_max ) ) return ( ( x_min , x_max ) , ( y_min , y_max ) )
return the entire axes space for figure .