Exemple #1
0
        axDef.plot(xDat, yDat)
        axDef.set_xlim([xDat[0], xDat[-1]])
        axDef.set_ylim(-0.5,3.0)
        axDef.set_xticks(xDat)
        axDef.set_xticklabels(xDat)
        for i in xDat:
            axDef.axvline(i, color='k', lw=0.5)
        axDef.set_ylabel('$\Delta H_f$ (eV)')
        axDef.axhline(y=0, ls='--', lw=0.5, color='k')
        figDef.legend(legDef, ncol=1, prop={'size': 14}, loc='center', bbox_to_anchor=(0.78, 0.25))

        plt.show()

if len(frags[prim]['fracs'].keys()) > 3:
    axSlider = plt.axes([0.1, 0.05, 0.75, 0.02])  # [left,bottom,width,height]
    sfree = Slider(axSlider, '$\Delta\mu_{%s}$' % str(free),
                   round(float(solve(frags[prim]['line'].subs(x, 0))[0]), 0), 0.0,
                   valinit=0.0, valstep=0.001, valfmt="%1.3f")
    sfree.on_changed(update)
    sfree.label.set_size(20)

axChecks = plt.axes([0.1, 0.1, 0.3, 0.4], frameon=False)
visibility = [shade.set_visible(False) if shade else [] for shade in shades]
check = PremiumCheckButtons(axChecks, ax.lines[1:], visibility, loc=3, borderaxespad=0)

check.on_clicked(shade)

cid = fig.canvas.mpl_connect('button_press_event', genDefect)

plt.show()
Exemple #2
0
axes = {'labelpad': 16, 'labelsize': 20}
ticks = {'labelsize': 16}
arrows = {'fontsize': 12, 'labelpad': 20}
font = {'family': 'times new roman'}
opt = {'font': font, 'xtick': ticks, 'ytick': ticks, 'axes': axes}
for i in opt:
    plt.rc(i, **opt[i])

locs = [r'E:\Research\VASP Data\BiVO4-V2O5\slabs\BVO\001']

periods = [2.55]

for loc in locs:
    load(loc, axis="Z")
    plot(periods=periods,
         #          save=True
         )

axSlider = plt.axes([0.15, 0.05, 0.75, 0.02])  # [left,bottom,width,height]
sPeriod = Slider(axSlider,
                 'Period',
                 0.001,
                 latticelength[idir],
                 valinit=0.001,
                 valstep=0.001,
                 valfmt="%1.3f")
sPeriod.on_changed(update)
sPeriod.label.set_size(14)

plt.show()