get_keyword_defaults

sherpa.plot.backend_utils.get_keyword_defaults(func, ignore_args=['title', 'xlabel', 'ylabel', 'overplot', 'overcontour', 'clearwindow', 'clearaxes', 'xerr', 'yerr'])[source] [edit on github]

Get default values for keyword arguments

This method differs from sherpa.utils.get_keyword_defaults, which inspects all arguments, while this function looks only at keyword arguments. Also, in sherpa.utils.get_keyword_defaults arguments can be skipped by order, while here they are skipped by name (using the ignore_args) parameter. Thus, this function is better suited to the plotting backends, which use several keyword-only arguments.

Parameters:
  • func (callable) – function or method to inspect

  • ignore_args (list) – Any keyword arguments with names listed here will be ignored

Returns:

default_values – Dictionary with argument names and default values

Return type:

dict