cellpy.utils.batch_tools.batch_plotters#

Module Contents#

Classes#

CyclingSummaryPlotter

Attributes (inherited):

EISPlotter

Functions#

create_legend(info, c[, option, use_index])

creating more informative legends

create_plot_option_dicts(info[, marker_types, colors, ...])

Create two dictionaries with plot-options.

create_summary_plot_bokeh(data, info, group_styles, ...)

exporting_plots(**kwargs)

generate_summary_frame_for_plotting(pages, experiment, ...)

generate_summary_plots(experiment, **kwargs)

look_up_group(info, c)

plot_cycle_life_summary_bokeh(info, summaries[, ...])

plot_cycle_life_summary_matplotlib(info, summaries[, ...])

plot_cycle_life_summary_plotly(summaries, **kwargs)

plot_cycle_life_summary_seaborn(summaries, **kwargs)

summary_plotting_engine(**kwargs)

creates plots of summary data.

Attributes#

available_plotting_backends

bokeh_available

csp

hdr_journal

hdr_summary

plotly_available

seaborn_available

class CyclingSummaryPlotter(*args, reset_farms=True)[source]#

Bases: cellpy.utils.batch_tools.batch_core.BasePlotter

Inheritance diagram of cellpy.utils.batch_tools.batch_plotters.CyclingSummaryPlotter
Attributes (inherited):

experiments: list of experiments. farms: list of farms (containing pandas DataFrames or figs). barn (str): identifier for where to place the output-files. reset_farms (bool): empty the farms before running the engine.

property columns[source]#
run_dumper(dumper)[source]#

run dumber (once pr. engine)

Parameters:

dumper – dumper to run (function or method).

The dumper takes the attributes experiments, farms, and barn as input. It does not return anything. But can, if the dumper designer feels in a bad and nasty mood, modify the input objects (for example experiments).

run_engine(engine, **kwargs)[source]#

run engine (once pr. experiment).

Parameters:

engine – engine to run (function or method).

The method issues the engine command (with experiments and farms as input) that returns an updated farms as well as the barn and assigns them both to self.

The farms attribute is a list of farms, i.e. [farm1, farm2, …], where each farm contains pandas DataFrames.

The barns attribute is a pre-defined string used for picking what folder(s) the file(s) should be exported to. For example, if barn equals “batch_dir”, the file(s) will be saved to the experiments batch directory.

The engine(s) is given self.experiments and self.farms as input and returns farms to self.farms and barn to self.barn. Thus, one could in principle modify self.experiments within the engine without explicitly ‘notifying’ the poor soul who is writing a batch routine using that engine. However, it is strongly advised not to do such things. And if you, as engine designer, really need to, then at least notify it through a debug (logger) statement.

class EISPlotter[source]#

Bases: cellpy.utils.batch_tools.batch_core.BasePlotter

Inheritance diagram of cellpy.utils.batch_tools.batch_plotters.EISPlotter
do()[source]#
create_legend(info, c, option='clean', use_index=False)[source]#

creating more informative legends

create_plot_option_dicts(info, marker_types=None, colors=None, line_dash=None, size=None, palette=None)[source]#

Create two dictionaries with plot-options.

The first iterates colors (based on group-number), the second iterates through marker types.

Returns: group_styles (dict), sub_group_styles (dict)

create_summary_plot_bokeh(data, info, group_styles, sub_group_styles, label=None, title='Capacity', x_axis_label='Cycle number', y_axis_label='Capacity (mAh/g)', width=900, height=400, legend_option='clean', legend_location='bottom_right', x_range=None, y_range=None, tools=None)[source]#
exporting_plots(**kwargs)[source]#
generate_summary_frame_for_plotting(pages, experiment, **kwargs)[source]#
generate_summary_plots(experiment, **kwargs)[source]#
look_up_group(info, c)[source]#
plot_cycle_life_summary_bokeh(info, summaries, width=900, height=800, height_fractions=None, legend_option='all', add_rate=True, **kwargs)[source]#
plot_cycle_life_summary_matplotlib(info, summaries, width=900, height=800, height_fractions=None, legend_option='all', **kwargs)[source]#
plot_cycle_life_summary_plotly(summaries: pandas.DataFrame, **kwargs)[source]#
plot_cycle_life_summary_seaborn(summaries: pandas.DataFrame, **kwargs)[source]#
summary_plotting_engine(**kwargs)[source]#

creates plots of summary data.

available_plotting_backends = ['matplotlib'][source]#
bokeh_available[source]#
csp[source]#
hdr_journal[source]#
hdr_summary[source]#
plotly_available[source]#
seaborn_available[source]#