class_docstr: A helper class to figure out the range of grid lines that need to be drawn.
class_docstr_tok: ["A","helper","class","to","figure","out","the","range","of","grid","lines","that","need","to","be","drawn","."]
docstr: Compute an approximation of the bounding box obtained by applying
  *transform_xy* to the box delimited by ``(x1, y1, x2, y2)``.
  
  The intended use is to have ``(x1, y1, x2, y2)`` in axes coordinates,
  and have *transform_xy* be the transform from axes coordinates to data
  coordinates; this method then returns the range of data coordinates
  that span the actual axes.
  
  The computation is done by sampling ``nx * ny`` equispaced points in
  the ``(x1, y1, x2, y2)`` box and finding the resulting points with
  extremal coordinates; then adding some padding to take into account the
  finite sampling.
  
  As each sampling step covers a relative range of *1/nx* or *1/ny*,
  the padding is computed by expanding the span covered by the extremal
  coordinates by these fractions.
docstr_tok: ["Compute","an","approximation","of","the","bounding","box","obtained","by","applying","*","transform_xy","*","to","the","box","delimited","by","``","(","x1",",","y1",",","x2",",","y2",")","``",".","The","intended","use","is","to","have","``","(","x1",",","y1",",","x2",",","y2",")","``","in","axes","coordinates",",","and","have","*","transform_xy","*","be","the","transform","from","axes","coordinates","to","data","coordinates",";","this","method","then","returns","the","range","of","data","coordinates","that","span","the","actual","axes",".","The","computation","is","done","by","sampling","``","nx","*","ny","``","equispaced","points","in","the","``","(","x1",",","y1",",","x2",",","y2",")","``","box","and","finding","the","resulting","points","with","extremal","coordinates",";","then","adding","some","padding","to","take","into","account","the","finite","sampling",".","As","each","sampling","step","covers","a","relative","range","of","*","1\/nx","*","or","*","1\/ny","*",",","the","padding","is","computed","by","expanding","the","span","covered","by","the","extremal","coordinates","by","these","fractions","."]
code: def __call__(self, transform_xy, x1, y1, x2, y2):
      """
      Compute an approximation of the bounding box obtained by applying
      *transform_xy* to the box delimited by ``(x1, y1, x2, y2)``.
  
      The intended use is to have ``(x1, y1, x2, y2)`` in axes coordinates,
      and have *transform_xy* be the transform from axes coordinates to data
      coordinates; this method then returns the range of data coordinates
      that span the actual axes.
  
      The computation is done by sampling ``nx * ny`` equispaced points in
      the ``(x1, y1, x2, y2)`` box and finding the resulting points with
      extremal coordinates; then adding some padding to take into account the
      finite sampling.
  
      As each sampling step covers a relative range of *1/nx* or *1/ny*,
      the padding is computed by expanding the span covered by the extremal
      coordinates by these fractions.
      """
      x, y = np.meshgrid(
          np.linspace(x1, x2, self.nx), np.linspace(y1, y2, self.ny)
      )
      xt, yt = transform_xy(np.ravel(x), np.ravel(y))
      return self._add_pad(xt.min(), xt.max(), yt.min(), yt.max())
  
imports: import numpy
  from matplotlib import ticker
  from matplotlib.transforms import Bbox, Transform
label_desc: Use image node_id 2 for calling the ExtremeFinderSimple obj's underlying member method code with example usage: obj.__call__(transform_xy, x1, y1, x2, y2) and returns: self