Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linestyle only applied to spin up #95

Closed
MRedies opened this issue Nov 19, 2021 · 3 comments
Closed

Linestyle only applied to spin up #95

MRedies opened this issue Nov 19, 2021 · 3 comments

Comments

@MRedies
Copy link
Contributor

MRedies commented Nov 19, 2021

f, ax = plt.subplots(1,1, figsize=np.array([6,4])*1.2, constrained_layout=True)

with HDF5Reader("../../calc/YIG/PBE/kpts=0003/DOS/banddos.hdf") as h5reader:
    data, attributes = h5reader.read(recipe=FleurDOS)
    plot_fleur_dos(data, attributes, multiply_by_equiv_atoms=True, linewidth=1.5, axis=ax,
                   show=False, title="PBE", legend_options={'fontsize':12}, 
                   limits={'energy':[-8.5,8.5]}, legend=False, spin_arrows=False,
                   colors=["k", "C0", "C1", "C2", "C3", "C4"], 
                   linestyle=["-", "-", "-", "-", "--", "-"]
                  )
    
    handles, labels = ax.get_legend_handles_labels()
    handels = handles[:-int(len(handles)/2)]
    labels = labels[:-int(len(handles)/2)]
    
    
    bandgap = 0.4386253446
    ax.axvspan(0, bandgap, facecolor='r', alpha=0.1)
    ax.text(bandgap, -61, "$\leftarrow$0.44 eV ", fontsize=14)
    
    labels = transform_legend(labels)
    ax.set_xlim([-8.5,8.5])
    ax.set_ylim([-65,65])
    ax.legend(handles, labels, ncol=4, fontsize=12, bbox_to_anchor=(0.95,-0.18))
    
    
    ax.text(-8.5, 50, r"$\uparrow$", fontsize=26)
    ax.text(-8.5, -60, r"$\downarrow$", fontsize=26)
    
plt.savefig("YIG_PBE.pdf")
plt.show()

Leads to:
image

Notice, that the oxygen is only dashed for the spin up and that the x-axis somehow also is dashed.

@janssenhenning
Copy link
Contributor

janssenhenning commented Nov 19, 2021

Could you try with the last commit c45bae5?

@janssenhenning
Copy link
Contributor

The lines through 0 and the fermi energy are dashed by default. If you want them in a different style the argument line_options={'linestyle': '-'} can accomplish this

@MRedies
Copy link
Contributor Author

MRedies commented Nov 19, 2021

I haven't setup the development version on my home computer. Will look into it though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants