funclp.plot module

funclp.plot(function, path, args, kwargs={}, name=None, nmodel2plot=None)[source]

Makes a plot of a function object.

Parameters:
  • function (Function) – Function object to plot on the data.

  • path (str or pathlib.Path) – Path where to save the figure(s).

  • args (tuple) – Argment to input in the function for calculating output.

  • kwargs (dic) – Keyword argment to input in the function for calculating output.

  • name (str) – Name of plot, if None will use name of function object.

  • nmodel2plit (int) – Number of model to plot when having a multimodels data.

Returns:

out – Output array.

Return type:

xp.ndarray

Examples

>>> from funclp import plot
>>> from funclp.functions import Gaussian
>>> import numpy as np
...
>>> variables = (np.linspace(-1, 1, 1000),) # tuple
>>> instance = Gaussian()
>>> plot(instance, '', variables)