In [4]:
%matplotlib inline
from pycalphad import Database, calculate
import pycalphad.variables as v
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('fivethirtyeight')

In [14]:
from pycalphad import calculate
from pycalphad.plot.utils import phase_legend
import numpy as np

phases = ['AL3NI2']
legend_handles, colorlist = phase_legend(phases)
dbf = Database('out/alni.tdb')
fig = plt.figure(figsize=(9,6))
ax = fig.gca()
for name in phases:
    result = calculate(dbf, ['AL', 'NI', 'VA'], name, T=300, P=1e5)
    ax.scatter(result.X.sel(component='NI'), result.GM,
               marker='.', s=5, color=colorlist[name.upper()])
ax.set_xlim((0, 1))
#ax.set_ylim((-80000, -40000))
ax.legend(handles=legend_handles, loc='center left', bbox_to_anchor=(1, 0.6))
plt.show()



In [ ]: