Skip to content

Commit

Permalink
Tweaking plot aesthetics
Browse files Browse the repository at this point in the history
  • Loading branch information
elinscott committed Jun 19, 2024
1 parent dc7d968 commit 645147f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Binary file modified tutorials/tutorial_6/cri3_bandstructures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions tutorials/tutorial_6/plot_bands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from koopmans.io import read
import matplotlib.pyplot as plt

from koopmans.io import read

# Load the workflow
wf = read('cri3.kwf')

Expand All @@ -11,13 +12,11 @@
ki_bs = ui_calc.results['band structure']
ki_bs_shifted = ki_bs.subtract_reference()


# Plot the two band structures
ax = ki_bs_shifted.plot(spin=0, label='KI@LDA-up', color='tab:red', ls="-")
ax = ki_bs_shifted.plot(ax=ax, spin=1, label='KI@LDA-down', color='tab:red', ls="--")
ax = ki_bs_shifted.plot(spin=0, label='spin up', color='tab:red', ls="-")
ax = ki_bs_shifted.plot(ax=ax, spin=1, label='spin down', color='tab:blue', ls="-")

ax.legend(loc='lower right', ncol=2, bbox_to_anchor=(1, 1))
ax.set_ylim([-5, 5])

plt.savefig('cri3_bandstructures.png')

0 comments on commit 645147f

Please sign in to comment.