def get_spec_point(K, N, band): return spec_points[data.odict(zip(["K", "N", "band"], [K, N, band]))]
def get_spec_point(K, N, band): return spec_points[data.odict(zip(['K', 'N', 'band'],[K,N,band]))]
plt.ylabel('Energy after scaling and shifting', fontsize=14) ax = plt.gca() handles, labels = ax.get_legend_handles_labels() hl = sorted(zip(handles, labels), key= lambda x: x[1]) handles2, labels2 = zip(*hl) ax.legend(handles2[0:5], labels2[0:5], loc = 'best', fontsize=14) plt.hlines([0, 1], -0.45, -0.05, colors='k', linestyles='dotted') plt.hlines([2], 0.55, 0.95, colors='k', linestyles='dotted') plt.tight_layout() ax.legend(handles2[0:5], labels2[0:5], loc = 'best', fontsize=14) ax.legend(handles2[0:5], labels2[0:5], loc = '4', fontsize=14) ax.legend(handles2[0:5], labels2[0:5], loc = 4, fontsize=14) plt.draw() spec_points(data.odict(zip(['K', 'N', 'band'],[0,0,0]))) spec_points[data.odict(zip(['K', 'N', 'band'],[0,0,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[0,1,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[1,1,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[2,0,0]))].view('chemscaled_E') spec_points[data.odict(zip(['K', 'N', 'band'],[1,0,0]))].view('chemscaled_E') spec_points[data.odict(zip(['K', 'N', 'band'],[1,0,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[1,1,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[2,0,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[0,2,0]))] spec_points[data.odict(zip(['K', 'N', 'band'],[0,2,0]))].view('chemscaled_E') spec_points[data.odict(zip(['K', 'N', 'band'],[0,2,0]))].view_props('L', 'chemscaled_E') spec_points[data.odict(zip(['K', 'N', 'band'],[0,2,0]))].view_props(['L', 'chemscaled_E']) spec_points[data.odict(zip(['K', 'N', 'band'],[0,3,0]))].view_props(['L', 'chemscaled_E']) spec_points[data.odict(zip(['K', 'N', 'band'],[0,4,0]))].view_props(['L', 'chemscaled_E']) 6.411-6.3667