class_docstr: Widget to facilitate plotting
  
  Parameters
  ----------
  *args : arguments
      Arguments passed to the `ViewBox` super class.
  **kwargs : keywoard arguments
      Keyword arguments passed to the `ViewBox` super class.
  
  Notes
  -----
  This class is typically instantiated implicitly by a `Figure`
  instance, e.g., by doing ``fig[0, 0]``.
class_docstr_tok: ["Widget","to","facilitate","plotting","Parameters","--","--","--","--","--","*","args",":","arguments","Arguments","passed","to","the","`","ViewBox","`","super","class",".","*","*","kwargs",":","keywoard","arguments","Keyword","arguments","passed","to","the","`","ViewBox","`","super","class",".","Notes","--","--","-","This","class","is","typically","instantiated","implicitly","by","a","`","Figure","`","instance",",","e.g.",",","by","doing","``","fig","[","0",",","0","]","``","."]
docstr: Show an image
  
  Parameters
  ----------
  data : ndarray
      Should have shape (N, M), (N, M, 3) or (N, M, 4).
  cmap : str
      Colormap name.
  clim : str | tuple
      Colormap limits. Should be ``'auto'`` or a two-element tuple of
      min and max values.
  fg_color : Color or None
      Sets the plot foreground color if specified.
  kwargs : keyword arguments.
      More args to pass to :class:`~vispy.visuals.image.Image`.
  
  Returns
  -------
  image : instance of Image
      The image.
  
  Notes
  -----
  The colormap is only used if the image pixels are scalars.
docstr_tok: ["Show","an","image","Parameters","--","--","--","--","--","data",":","ndarray","Should","have","shape","(","N",",","M",")",",","(","N",",","M",",","3",")","or","(","N",",","M",",","4",")",".","cmap",":","str","Colormap","name",".","clim",":","str","|","tuple","Colormap","limits",".","Should","be","``","'auto","'","``","or","a","two-element","tuple","of","min","and","max","values",".","fg_color",":","Color","or","None","Sets","the","plot","foreground","color","if","specified",".","kwargs",":","keyword","arguments",".","More","args","to","pass","to",":","class",":","`","~vispy.visuals.image.Image","`",".","Returns","--","--","--","-","image",":","instance","of","Image","The","image",".","Notes","--","--","-","The","colormap","is","only","used","if","the","image","pixels","are","scalars","."]
code: def image(
      self, data, cmap="cubehelix", clim="auto", fg_color=None, **kwargs
  ):
      """Show an image
  
      Parameters
      ----------
      data : ndarray
          Should have shape (N, M), (N, M, 3) or (N, M, 4).
      cmap : str
          Colormap name.
      clim : str | tuple
          Colormap limits. Should be ``'auto'`` or a two-element tuple of
          min and max values.
      fg_color : Color or None
          Sets the plot foreground color if specified.
      kwargs : keyword arguments.
          More args to pass to :class:`~vispy.visuals.image.Image`.
  
      Returns
      -------
      image : instance of Image
          The image.
  
      Notes
      -----
      The colormap is only used if the image pixels are scalars.
      """
      self._configure_2d(fg_color)
      image = scene.Image(data, cmap=cmap, clim=clim, **kwargs)
      self.view.add(image)
      self.view.camera.aspect = 1
      self.view.camera.set_range()
  
      return image
  
file_path: vispy/vispy/plot/plotwidget.py
imports: from ..None import scene
  from ..io import read_mesh
  from ..geometry import MeshData
label_desc: Use image node_id 5 for calling the PlotWidget obj's underlying member method code with example usage: obj.image(data, cmap, clim, fg_color) and returns: image