I am using this code to extract BS, but I got error i tried to fix but its not done. The error is (ValueError: x and y must have same first dimension, but have shapes (21,) and (2, 21, 3395))
from NanoLanguage import *
import pylab as P
# Parameters
ncfile = '/u/jem/wolf6252/N-P/With-hyd/Fe/BS/BS.hdf5'
plotfile = 'plot.png'
ymin = -0.5
ymax = 0.5
# Colors for each band structure (add more if you have more than 4 band structures in the file)
colors = ['r','b','g','m']
bandstructures = nlread(ncfile, Bandstructure)
for i,bs in enumerate(bandstructures):
P.plot(bs._axisGUI(), bs.evaluate(), colors)
# Set x-ticks = the symmetry points
kticks = [ tick[0] for tick in bs._ticksGUI() ]
ticklabels = [ tick[1].replace('Γ','$\Gamma$') for tick in bs._ticksGUI() ]
P.xticks(kticks,ticklabels)
P.grid(kticks)
P.ylim(ymin,ymax)
P.savefig(plotfile)