code: def axis_to_data_points(ax, points_axis):
      
      axis_to_data = ax.transAxes + ax.transData.inverted()
      return axis_to_data.transform(points_axis)
docs: Map points in axis coordinates to data coordinates.
  
      Uses matplotlib.transform.
  
      Parameters
      ----------
      ax : matplotlib.axis
          Axis object from matplotlib.
      points_axis : np.array
          Points in axis coordinates.