1
0
Fork 0

simplex plot

This commit is contained in:
Alejandro Moreo Fernandez 2023-07-21 12:56:01 +02:00
parent d995990fba
commit 0ce6106ee1
1 changed files with 13 additions and 0 deletions

View File

@ -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()