gana.block.solution#

Solution

Functions

dataclass([cls, init, repr, eq, order, ...])

Add dunder methods based on the fields defined in the class.

rc(group, **kwargs)

Set the current .rcParams. group is the grouping for the rc, e.g., for lines.linewidth the group is lines, for axes.facecolor, the group is axes, and so on. Group may also be a list or tuple of group names, e.g., (xtick, ytick). kwargs is a dictionary attribute name/value pairs, e.g.,::.

Classes

I(*members[, size, start, mutable, tag, ...])

Set of index elements (X).

Solution([name])

A State with its variables filled in

V(*index[, itg, nn, bnr, mutable, tag, ltx, ...])

Ordered set of variables (Var).

class Solution(name: str = ' ')[source]#

Bases: object

A State with its variables filled in

Parameters:

name (str) – Name of the solution

name: str = ' '#
asdict()[source]#

Return the solution as a dictionary

update(variable_sets: list[V], n_sol: int = 0)[source]#

Add variables to the solution

draw(variable: V, kind: str = 'line', font_size: float = 16, fig_size: tuple[float, float] = (10, 6), linewidth: float = 0.7, color: str = 'blue', grid_alpha: float = 0.3, usetex: bool = True, x_ticks_lim: int = 20)[source]#

Plot the variable set

Parameters:
  • variable (V) – The variable to plot

  • kind (str, optional) – Type of plot [‘line’, ‘bar’], defaults to ‘line’

  • font_size (float, optional) – Font size for the plot, defaults to 16

  • fig_size (tuple[float, float], optional) – Size of the figure, defaults to (12, 6)

  • linewidth (float, optional) – Width of the line in the plot, defaults to 0.7

  • color (str, optional) – Color of the line in the plot, defaults to ‘blue’

  • grid_alpha (float, optional) – Transparency of the grid lines, defaults to 0.3

  • usetex (bool, optional) – Use LaTeX for text rendering, defaults to True

  • x_ticks_lim (int, optional) – Maximum number of x-ticks to display, defaults to 20

line(**kwargs)[source]#

Alias for plot with kind=’line’

bar(**kwargs)[source]#

Alias for plot with kind=’bar’