Skip to content

plot

plot module-attribute

plot = PlotCLI()

AfterOptions

Bases: HashableBaseModelIO

Options after loading the calibration file.

calculation class-attribute instance-attribute

calculation: CalculationOptions | None = None

Calculation options after loading the calibration file

CLIOptions

Bases: HashableBaseModelIO

exclude_models class-attribute instance-attribute

exclude_models: List[str] = []

Models to be excluded

exclude_plots class-attribute instance-attribute

exclude_plots: List[str] = []

Plots to be excluded

include_models class-attribute instance-attribute

include_models: List[str] | Literal['all'] | None = 'all'

Models to be included

include_plots class-attribute instance-attribute

include_plots: List[str] | Literal['all'] | None = 'all'

Plots to be included

overwrite class-attribute instance-attribute

overwrite: bool = False

Whether to overwrite the figures

model_post_init

model_post_init(__context: Any)

CalibrationResult

Bases: HashableBaseModelIO

Calibration result.

after class-attribute instance-attribute

Options after loading the calibration file

file class-attribute instance-attribute

file: str = ''

Path to the calibration file

read

read(root: str) -> OptimizerResult | None

Read the calibration file.

PlotCLI

Bases: _CLIBase

Micromechanical plot command line interface.

Config classmethod

Config() -> Type[PlotConfig]

key classmethod

key() -> str

loadConfig classmethod

loadConfig(
    config: str | PathLike | None = None,
    base_config: str | PathLike | None = None,
    key: str = "",
) -> PlotConfig

run

run(
    config: str | PathLike | None = None,
    base_config: str | PathLike | None = None,
    key: str = "",
    *,
    overwrite: bool | None = None,
    include_plots: List[str] | str | None = None,
    exclude_plots: List[str] | str | None = None,
    include_models: List[str] | str | None = None,
    exclude_models: List[str] | str | None = None
)

Plotting command line interface.

PARAMETER DESCRIPTION
config

Configuration file, by default None. If None, search for the default configuration files.

TYPE: str | PathLike | None DEFAULT: None

base_config

Base configuration file to merge with the main configuration file, by default None

TYPE: str | PathLike | None DEFAULT: None

key

Key of the table in the configuration file, by default ""

TYPE: str DEFAULT: ''

overwrite

Overwrite existing figures, by default False

TYPE: bool DEFAULT: None

include_plots

Include plots, by default None (all). Can be glob patterns.

TYPE: List[str] | str DEFAULT: None

exclude_plots

Exclude plots, by default None. Can be glob patterns.

TYPE: List[str] | str DEFAULT: None

include_models

Include models, by default None (all). Can be glob patterns.

TYPE: List[str] | str DEFAULT: None

exclude_models

Exclude models, by default None. Can be glob patterns.

TYPE: List[str] | str DEFAULT: None

section classmethod

section() -> str

PlotConfig

Bases: HashableBaseModelIO

calculation class-attribute instance-attribute

calculation: Annotated[CalculationOptions, Field(exclude=True)] = (
    CalculationOptions()
)

Base calculation options

cli class-attribute instance-attribute

Command line options

experiment class-attribute instance-attribute

experiment: Annotated[ExperimentOptions, Field(exclude=True)] = (
    ExperimentOptions()
)

Base experiment files and filters

figures class-attribute instance-attribute

figures: Annotated[Dict[str, FigureOptions], Field(exclude=True)] = {}

Base figures

grids class-attribute instance-attribute

grids: Dict[str, GridOptions] = {}

Grid options

plots class-attribute instance-attribute

plots: Dict[str, PlotOptions] = {}

Plot options

root class-attribute instance-attribute

root: str | None = None

Root path

model_post_init

model_post_init(__context: Any) -> None

model_validator classmethod

model_validator(data: dict)

Pre-process the configuration data to translate strings with patterns like <<en:Hello, zh:你好>> to the given language.

PlotOptions

Bases: ExpandableBaseModelIO

Plot options.

calculation class-attribute instance-attribute

calculation: CalculationOptions = CalculationOptions()

Calculation options

calibration class-attribute instance-attribute

Calibration result

experiment class-attribute instance-attribute

experiment: ExperimentOptions = ExperimentOptions()

Experiment files and filters

figures class-attribute instance-attribute

figures: Dict[str, FigureOptions] = {}

Figures

model_type class-attribute instance-attribute

model_type: AvailableModels | str = 'CH-OSIMSAND'

Type of the model

name class-attribute instance-attribute

name: str | None = None

Name of the plot, by default None which will be generated from the base name and matrix options

model_post_init

model_post_init(__context: Any)

Post-initialization.

plot

plot(
    name: str,
    *,
    grids: Dict[str, GridOptions] = None,
    save: bool = True,
    overwrite: bool = True,
    exclude_figures: List[str] = None
)

setup

setup(root: str)

Set up the plot options, i.e., read the calibration file.