The tutorial shows how to plot grids with plot_dos() function


In [ ]:
if 1:
        import matplotlib as mpl

        mpl.rc('font',family='Arial')

        total = 3*1
        letters = ['(a)', '(b)', '(c)', '(d)']*10
        font = 8
        fig, axs = plt.subplots(total,1,figsize=(6,total*3))    
        fig.text(0.03, 0.5, 'PDOS (states/atom/eV)', size = font*1.8, ha='center', va='center', rotation='vertical')
    
        i = 0
        first = 0
        last = 0
        hide_xlabels = 1
        xlabel = None
        ylabel = None
        # i_last = 1
        for cl, iat in zip([RbVsd, KVsd, Vsd], [9, 57, 49]):
        # for cl, iat in zip([RbVsd, KVsd, Vsd], [13, 61, 53]):

            ax = axs[i]
            letter = letters[i]
            
            if i == 0:
                first = True
                last = False
            if i == total-1:
                last = True
                hide_xlabels = 0
                xlabel = "Energy (eV)"



            i+=1

            plot_dos(cl,  iatom = iat,  
            dostype = 'partial', orbitals = ['p6', 'd'], 
            neighbors = 4,
            # labels = ['LiFePO4', 'LiFePO4 vac'],
            show = 0, nsmooth = 40,
            plot_param = {'dashes':(3,1), 'legend':1, 'fill':1, 'fontsize':font, 'legend_fontsize':font+3,
            'first':first, 'last':last, 'ax':ax, 'pad':1, 'hide_xlabels':hide_xlabels, 'xlabel':xlabel, 'ylabel':ylabel,
            'corner_letter':letter, 'fig_format':'pdf',
            'linewidth':1.5, 'ylim':(-2,2), 'xlim':(-10,8) }, split_type = 'octa', plot_spin_pol = 1 )

In [1]:
#picture generated on previous step
from IPython.display import Image
Image(filename='figs/rbv_dos.png')


Out[1]: