In [1]:
import matplotlib.pyplot as plt
# %matplotlib inline
from pymatgen.util.plotting_utils import get_publication_quality_plot
In [2]:
import numpy as np
import pandas as pd
In [3]:
ls
In [4]:
datafile = pd.read_csv('results.csv')
In [5]:
datafile.head(0)
Out[5]:
In [6]:
x = datafile['ecut (Ry)'].tolist()
x
Out[6]:
In [7]:
y_energy = datafile['Total Energy (eV)'].tolist()
y_conver = datafile['energy difference (meV/atom)'].tolist()
In [8]:
fig, (ax0,ax1)=plt.subplots(nrows=2)
fig.set_size_inches(10,10)
ax0.scatter(x, y_energy,marker='o',alpha=0.75,s=60,c='r')
ax0.plot(x,y_energy,c='black')
ax0.set_title('Energy',fontsize=30,y=1.05)
ax0.set_xlabel('Kinetic Energy Cutoff (Ry)',fontsize=24)
ax0.set_ylabel('Total Energy (eV)',fontsize=20)
ax0.set_ylim( -1271.54,-1271.38)
ax0.tick_params(labelsize = 18)
ax1.scatter(x,y_conver,marker='o',alpha=0.75, s=60,c='b')
ax1.plot(x,y_conver,c='black')
ax1.set_title('Energy Difference',fontsize=24,y=1.05)
ax1.set_xlabel('Kinetic Energy Cutoff (Ry)',fontsize=24)
ax1.set_ylabel('Energy Converge (meV)',fontsize=18)
# ax1.set_yscale('log')
ax1.set_ylim(-10,80)
ax1.annotate('Convergence < 5 meV', xy=(41, 5), xycoords='data',
xytext=(0.8, 0.95), textcoords='axes fraction',
arrowprops=dict(facecolor='black', shrink=0.05),
horizontalalignment='right', verticalalignment='top',fontsize=16
)
ax1.tick_params(labelsize = 18)
plt.subplots_adjust(hspace=0.5)
plt.show()
In [17]:
Out[17]:
In [18]:
plt.show()