plot.dataplot
plot.dataplot(comps, phases, conds, datasets, tielines=True, ax=None, plot_kwargs=None, tieline_plot_kwargs=None)
Plot datapoints corresponding to the components, phases, and conditions.
Parameters
Name | Type | Description | Default |
---|---|---|---|
comps |
list | Names of components to consider in the calculation. | required |
phases |
[] | Names of phases to consider in the calculation. | required |
conds |
dict | Maps StateVariables to values and/or iterables of values. | required |
datasets |
PickleableTinyDB | required | |
tielines |
bool | If True (default), plot the tie-lines from the data | True |
ax |
matplotlib.Axes | Default axes used if not specified. | None |
plot_kwargs |
dict | Additional keyword arguments to pass to the matplotlib plot function for points | None |
tieline_plot_kwargs |
dict | Additional keyword arguments to pass to the matplotlib plot function for tielines | None |
Returns
Type | Description |
---|---|
matplotlib.Axes | A plot of phase equilibria points as a figure |
Examples
>>> from espei.datasets import load_datasets, recursive_glob
>>> from espei.plot import dataplot
>>> datasets = load_datasets(recursive_glob('.', '*.json'))
>>> my_phases = ['BCC_A2', 'CUMG2', 'FCC_A1', 'LAVES_C15', 'LIQUID']
>>> my_components = ['CU', 'MG' 'VA']
>>> conditions = {v.P: 101325, v.T: (500, 1000, 10), v.X('MG'): (0, 1, 0.01)}
>>> dataplot(my_components, my_phases, conditions, datasets)