slitflow.fig.line module
- class Simple(info_path=None)[source]
Bases:
FigureLine graph with or without error bar.
- Parameters:
reqs[0] (Table) – Table containing X and Y axes to create figure.
param["calc_cols"] (list of str) – Column names for X and Y axes.
param["err_col"] (str, optional) – Column name for error bar.
param["cap_size"] (float, optional) – Cap size of error bar. Required if “err_col” in param. Defaults to 2.
param["group_depth"] (int) – Data split depth number. This depth splits data for plotting. The split data is plotted as different lines. For example, if you want to plot each trajectory from a table containing column names “img_no” and “trj_no”, you have to set group_depth=2. If you set group_depth=1, all trajectories are misconnected to each other.
- Returns:
Line Figure object
- Return type:
- static process(reqs, param)[source]
Line graph with or without error bar.
- Parameters:
reqs[0] (pandas.DataFrame) – Table containing X and Y axes to create figure.
param["calc_cols"] (list of str) – Column names for X and Y axes.
param["err_col"] (str, optional) – Column name for error bar.
param["cap_size"] (float, optional) – Cap size of error bar. Required if “err_col” in param.
param["index_cols"] (list of str) – Column names of index. These column names are used for
pandas.DataFrame.groupby().
- Returns:
matplotlib Figure containing line plot
- Return type:
- class WithModel(info_path=None)[source]
Bases:
FigureLine with model curves.
- Parameters:
reqs[0] (Table) – Table containing X and Y axes of raw data.
reqs[1] (Table) – Table containing X and Y axes of model curve.
param["calc_cols"] (list of str) – Column names for X and Y axes.
param["err_col"] (str, optional) – Column name for error bar.
param["model_cols"] (list of str) – Column names for X and Y axes of model curves.
param["cap_size"] (float, optional) – Cap size of error bar. Required if “err_col” in param. Defaults to 2.
param["group_depth"] (int) – Data split depth number.
param["group_depth_model"] (int) – Depth number to split model data.
- Returns:
Line Figure object with error and model
- Return type:
- set_info(param={})[source]
Convert input information to Info object.
This method creates columns and parameters information. The columns information is used to handle data structure. The parameter dictionaries are set as param of
process(). This method is called beforerun(). Implemented in subclass.- Parameters:
param (dict, optional) – Parameters for columns or params.
- static process(reqs, param)[source]
Line with model curves.
- Parameters:
reqs[0] (pandas.DataFrame) – Table containing X and Y axes to create figure.
param["calc_cols"] (list of str) – Column names for X and Y axes.
param["err_col"] (str, optional) – Column name for error bar.
param["model_cols"] (list of str) – Column names for X and Y axes of model curves.
param["index_cols"] (list of str) – Column names of index. This column is used for
pandas.DataFrame.groupby().param["cap_size"] (float, optional) – Cap size of error bar. Required if “err_col” in param.
param["index_cols_model"] (list of str) – Column names of index. This column is used for
pandas.DataFrame.groupby()of model.
- Returns:
matplotlib Figure containing line plot with model
- Return type: