code: def axis_to_data(ax, width):
      
      xlim = ax.get_xlim()
      widthx = width*(xlim[1] - xlim[0])
      ylim = ax.get_ylim()
      widthy = width*(ylim[1] - ylim[0])
      return 0.5*(widthx + widthy)
docs: For a width in axis coordinates, return the corresponding in data
      coordinates.
  
      Parameters
      ----------
      ax : matplotlib.axis
          Axis object from matplotlib.
      width : float
          Width in xaxis coordinates.