egttools.plotting.plot_gradient¶
- plot_gradient(x, gradients, saddle_points, saddle_type, gradient_direction, fig_title='', xlabel='', figsize=(5, 4), **kwargs)[source]¶
Creates a figure plotting the gradient of selection together with the saddle points, and the gradient arrows.
- Parameters
x – vector containing the possible states in x axis. It must have the same length as gradient
gradients – vector containing the gradient for each possible state
saddle_points – vector containing all saddle points
saddle_type – vector of booleans indicating whether the saddle point is stable
gradient_direction – vector of points indicating the direction of the gradient between unstable and stable saddle points
fig_title – a string containing the title of the figure
xlabel – label for x axis
figsize – a tuple indicating the size of the figure
kwargs – you may pass an axis object
:returns a figure object