parameters: (backend=None)
return_statement: return module
docstring: Return the plotting backend to use (e.g. `pandas.plotting._matplotlib`).
  
      The plotting system of pandas has been using matplotlib, but the idea here
      is that it can also work with other third-party backends. In the future,
      this function will return the backend from a pandas option, and all the
      rest of the code in this file will use the backend specified there for the
      plotting.
  
      The backend is imported lazily, as matplotlib is a soft dependency, and
      pandas can be used without it being installed.
docstring_summary: Return the plotting backend to use (e.g. `pandas.plotting._matplotlib`).
docstring_tokens: Return the plotting backend to use ( e . g . pandas . plotting . _matplotlib ) .
function: def _get_plot_backend(backend=None):
      """
      Return the plotting backend to use (e.g. `pandas.plotting._matplotlib`).
  
      The plotting system of pandas has been using matplotlib, but the idea here
      is that it can also work with other third-party backends. In the future,
      this function will return the backend from a pandas option, and all the
      rest of the code in this file will use the backend specified there for the
      plotting.
  
      The backend is imported lazily, as matplotlib is a soft dependency, and
      pandas can be used without it being installed.
      """
      backend = backend or get_option("plotting.backend")
  
      if backend == "matplotlib":
          # Because matplotlib is an optional dependency and first-party backend,
          # we need to attempt an import here to raise an ImportError if needed.
          try:
              import pandas.plotting._matplotlib as module
          except ImportError:
              raise ImportError(
                  "matplotlib is required for plotting when the "
                  'default backend "matplotlib" is selected.'
              ) from None
  
          _backends["matplotlib"] = module
  
      if backend in _backends:
          return _backends[backend]
  
      module = _find_backend(backend)
      _backends[backend] = module
      return module
function_tokens: def _get_plot_backend ( backend = None ) : backend = backend or get_option ( "plotting.backend" ) if backend == "matplotlib" : # Because matplotlib is an optional dependency and first-party backend, # we need to attempt an import here to raise an ImportError if needed. try : import pandas . plotting . _matplotlib as module except ImportError : raise ImportError ( "matplotlib is required for plotting when the " 'default backend "matplotlib" is selected.' ) from None _backends [ "matplotlib" ] = module if backend in _backends : return _backends [ backend ] module = _find_backend ( backend ) _backends [ backend ] = module return module