forked from moreo/QuaPy
simplex plot
This commit is contained in:
parent
d995990fba
commit
0ce6106ee1
|
@ -0,0 +1,13 @@
|
||||||
|
import plotly.figure_factory as ff
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
Al = np.array([0. , 0. , 0., 0., 1./3, 1./3, 1./3, 2./3, 2./3, 1.])
|
||||||
|
Cu = np.array([0., 1./3, 2./3, 1., 0., 1./3, 2./3, 0., 1./3, 0.])
|
||||||
|
Y = 1 - Al - Cu
|
||||||
|
# synthetic data for mixing enthalpy
|
||||||
|
# See https://pycalphad.org/docs/latest/examples/TernaryExamples.html
|
||||||
|
enthalpy = (Al - 0.01) * Cu * (Al - 0.52) * (Cu - 0.48) * (Y - 1)**2
|
||||||
|
fig = ff.create_ternary_contour(np.array([Al, Y, Cu]), enthalpy,
|
||||||
|
pole_labels=['Al', 'Y', 'Cu'],
|
||||||
|
interp_mode='cartesian')
|
||||||
|
fig.show()
|
Loading…
Reference in New Issue