pycalphad.plot package¶
Subpackages¶
Submodules¶
pycalphad.plot.binary module¶
The binary module enables plotting of binary isobaric phase diagrams.
-
pycalphad.plot.binary.binplot(dbf, comps, phases, x_variable, low_temp, high_temp, steps=None, ax=None, **kwargs)[source]¶ Calculate the binary isobaric phase diagram for the given temperature range.
Parameters: - dbf (Database) – Thermodynamic database containing the relevant parameters.
- comps (list) – Names of components to consider in the calculation.
- phases (list) – Names of phases to consider in the calculation.
- x_variable (string) – Name of the x-axis variable to plot, e.g., ‘X(FE)’
- low_temp (float) – Lower bound of temperature to calculate.
- high_temp (float) – Upper bound of temperature to calculate.
- steps (int, optional) – Number of temperature steps to take between low_temp and high_temp.
- ax (Matplotlib Axes object, optional) –
- pdens (int, optional) – Number of points to sample per sublattice, per degree of freedom.
- ast (['numpy', 'numexpr'], optional) – Specify how we should construct the callable for the energy.
Returns: Return type: A phase diagram as a figure.
Examples
None yet.
pycalphad.plot.isotherm module¶
The isotherm module enables plotting of ternary isobaric-isothermal phase diagrams.
pycalphad.plot.utils module¶
The plot utils module contains some useful routines related to plotting.
-
pycalphad.plot.utils.phase_legend(phases)[source]¶ Build matplotlib handles for the plot legend.
Parameters: phases (list) – Names of the phases. Returns: - A tuple containing
- (1) A list of matplotlib handle objects
- (2) A dict mapping phase names to their RGB color on the plot
Examples
>>> legend_handles, colors = phase_legend(['FCC_A1', 'BCC_A2', 'LIQUID'])