sierra.core.graphs.stacked_line_graph
StackedLineGraph
: Generates a line graph from a set of columns in a CSV file.
- 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
- __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.