sierra.core.graphs.stacked_line_graph

class sierra.core.graphs.stacked_line_graph.StackedLineGraph(stats_root: Path, input_stem: str, output_fpath: Path, title: str, xlabel: Optional[str] = None, ylabel: Optional[str] = None, large_text: bool = False, legend: Optional[List[str]] = None, cols: Optional[List[str]] = None, linestyles: Optional[List[str]] = None, dashstyles: Optional[List[str]] = None, logyscale: bool = False, stddev_fpath: Optional[Path] = None, stats: str = 'none', model_root: Optional[Path] = None)[source]

Generates a line graph from a set of columns in a CSV file.

If the necessary data file does not exist, the graph is not generated.

If the .stddev file that goes with the .mean does not exist, then no error bars are plotted.

If the .model file that goes with the .mean does not exist, then no model predictions are plotted.

Ideally, model predictions/stddev calculations would be in derived classes, but I can’t figure out a good way to easily pull that stuff out of here.

Inheritance

Inheritance diagram of StackedLineGraph
__dict__ = mappingproxy({'__module__': 'sierra.core.graphs.stacked_line_graph', '__doc__': "Generates a line graph from a set of columns in a CSV file.\n\n    If the necessary data file does not exist, the graph is not generated.\n\n    If the .stddev file that goes with the .mean does not exist, then no error\n    bars are plotted.\n\n    If the .model file that goes with the .mean does not exist, then no model\n    predictions are plotted.\n\n    Ideally, model predictions/stddev calculations would be in derived classes,\n    but I can't figure out a good way to easily pull that stuff out of here.\n\n    ", '__init__': <function StackedLineGraph.__init__>, 'generate': <function StackedLineGraph.generate>, '_plot_ticks': <function StackedLineGraph._plot_ticks>, '_plot_selected_cols': <function StackedLineGraph._plot_selected_cols>, '_plot_col_errorbars': <function StackedLineGraph._plot_col_errorbars>, '_plot_legend': <function StackedLineGraph._plot_legend>, '_read_stats': <function StackedLineGraph._read_stats>, '_read_models': <function StackedLineGraph._read_models>, '__dict__': <attribute '__dict__' of 'StackedLineGraph' objects>, '__weakref__': <attribute '__weakref__' of 'StackedLineGraph' objects>, '__annotations__': {}})
__doc__ = "Generates a line graph from a set of columns in a CSV file.\n\n    If the necessary data file does not exist, the graph is not generated.\n\n    If the .stddev file that goes with the .mean does not exist, then no error\n    bars are plotted.\n\n    If the .model file that goes with the .mean does not exist, then no model\n    predictions are plotted.\n\n    Ideally, model predictions/stddev calculations would be in derived classes,\n    but I can't figure out a good way to easily pull that stuff out of here.\n\n    "
__init__(stats_root: Path, input_stem: str, output_fpath: Path, title: str, xlabel: Optional[str] = None, ylabel: Optional[str] = None, large_text: bool = False, legend: Optional[List[str]] = None, cols: Optional[List[str]] = None, linestyles: Optional[List[str]] = None, dashstyles: Optional[List[str]] = None, logyscale: bool = False, stddev_fpath: Optional[Path] = None, stats: str = 'none', model_root: Optional[Path] = None) None[source]
__module__ = 'sierra.core.graphs.stacked_line_graph'
__weakref__

list of weak references to the object (if defined)

_plot_col_errorbars(data_df: DataFrame, stddev_df: DataFrame, col: str) None[source]

Plot the errorbars for a specific column in a dataframe.

_plot_legend(ax, model_legend: List[str], ncols: int) None[source]
_plot_selected_cols(data_df: DataFrame, stat_dfs: Dict[str, DataFrame], cols: List[str], model: Tuple[DataFrame, List[str]])[source]

Plot the selected columns in a dataframe.

This may include:

  • Errorbars

  • Models

  • Custom line styles

  • Custom dash styles

_plot_ticks(ax) None[source]
_read_models() Tuple[DataFrame, List[str]][source]
_read_stats() Dict[str, DataFrame][source]
generate() None[source]