class_docstr: The renderer handles all the drawing primitives using a graphics
  context instance that controls the colors/styles
docstr: Restore the saved region. If bbox (instance of BboxBase, or
  its extents) is given, only the region specified by the bbox
  will be restored. *xy* (a tuple of two floasts) optionally
  specifies the new position (the LLC of the original region,
  not the LLC of the bbox) where the region will be restored.
  
  >>> region = renderer.copy_from_bbox()
  >>> x1, y1, x2, y2 = region.get_extents()
  >>> renderer.restore_region(region, bbox=(x1+dx, y1, x2, y2),
  ...                         xy=(x1-dx, y1))
docstr_tok: ["Restore","the","saved","region",".","If","bbox","(","instance","of","BboxBase",",","or","its","extents",")","is","given",",","only","the","region","specified","by","the","bbox","will","be","restored",".","*","xy","*","(","a","tuple","of","two","floasts",")","optionally","specifies","the","new","position","(","the","LLC","of","the","original","region",",","not","the","LLC","of","the","bbox",")","where","the","region","will","be","restored",".",">",">",">","region","=","renderer.copy_from_bbox","(",")",">",">",">","x1",",","y1",",","x2",",","y2","=","region.get_extents","(",")",">",">",">","renderer.restore_region","(","region",",","bbox=","(","x1+dx",",","y1",",","x2",",","y2",")",",","...","xy=","(","x1-dx",",","y1",")",")"]
code: def restore_region(self, region, bbox=None, xy=None):
      """
      Restore the saved region. If bbox (instance of BboxBase, or
      its extents) is given, only the region specified by the bbox
      will be restored. *xy* (a tuple of two floasts) optionally
      specifies the new position (the LLC of the original region,
      not the LLC of the bbox) where the region will be restored.
  
      >>> region = renderer.copy_from_bbox()
      >>> x1, y1, x2, y2 = region.get_extents()
      >>> renderer.restore_region(region, bbox=(x1+dx, y1, x2, y2),
      ...                         xy=(x1-dx, y1))
  
      """
      if bbox is not None or xy is not None:
          if bbox is None:
              x1, y1, x2, y2 = region.get_extents()
          elif isinstance(bbox, BboxBase):
              x1, y1, x2, y2 = bbox.extents
          else:
              x1, y1, x2, y2 = bbox
  
          if xy is None:
              ox, oy = x1, y1
          else:
              ox, oy = xy
  
          # The incoming data is float, but the _renderer type-checking wants
          # to see integers.
          self._renderer.restore_region(
              region,
              int(x1),
              int(y1),
              int(x2),
              int(y2),
              int(ox),
              int(oy),
          )
  
      else:
          self._renderer.restore_region(region)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import numpy
  from collections import OrderedDict
  from math import radians, cos, sin
  from matplotlib import cbook, rcParams, __version__
  from matplotlib.backend_bases import _Backend, FigureCanvasBase, FigureManagerBase, RendererBase, cursors
  from matplotlib.cbook import maxdict
  from matplotlib.figure import Figure
  from matplotlib.font_manager import findfont, get_font
  from matplotlib.ft2font import LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING, LOAD_DEFAULT, LOAD_NO_AUTOHINT
  from matplotlib.mathtext import MathTextParser
  from matplotlib.path import Path
  from matplotlib.transforms import Bbox, BboxBase
  from matplotlib import colors
  from matplotlib.backends._backend_agg import RendererAgg
  from matplotlib import _png
label_desc: Use image node_id 24 for calling the RendererAgg obj's underlying member method code with example usage: obj.restore_region(region, bbox, xy) without return types