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

plot bands with only one kpoint #3798

Merged
merged 10 commits into from
Apr 12, 2020
6 changes: 6 additions & 0 deletions aiida/orm/nodes/data/array/bands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,12 @@ def _prepare_json(self, main_file_name='', comments=True):
first_band_1 = True
first_band_2 = True

if len(paths) <= 1:
path = paths[0]
ltalirz marked this conversation as resolved.
Show resolved Hide resolved
values = path['values']
x = [path['x'] for _ in values]
p.scatter(x, values, marker="_")

for path in paths:
ltalirz marked this conversation as resolved.
Show resolved Hide resolved
if path['length'] <= 1:
# Avoid printing empty lines
Expand Down