zerothi / sisl

Electronic structure Python package for post analysis and large scale tight-binding DFT/NEGF calculations
https://zerothi.github.io/sisl
Mozilla Public License 2.0
173 stars 57 forks source link

Allow dash to be set in bands plots. #780

Closed pfebrer closed 1 month ago

pfebrer commented 1 month ago

This commit also makes line dash work for the matplotlib backend

One can now use the"dash" key in bands_style, as in all other line style specifications in the viz module:

sisl.get_sile("file.bands").plot(bands_style={"dash": "dot"})

newplot (73)

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 66.25%. Comparing base (2b299e3) to head (1c5596d).

Files Patch % Lines
src/sisl/viz/figure/matplotlib.py 0.00% 4 Missing :warning:
src/sisl/viz/processors/bands.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #780 +/- ## =========================================== - Coverage 87.36% 66.25% -21.11% =========================================== Files 396 396 Lines 50706 50609 -97 =========================================== - Hits 44298 33530 -10768 - Misses 6408 17079 +10671 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

zerothi commented 1 month ago

@pfebrer this one fails CI, bands.py: L132, KeyError.

pfebrer commented 1 month ago

Can you add "dash": "solid" to the default styles here? https://github.com/zerothi/sisl/blob/58f4758438a66f598e6140826a87571c3e047c12/src/sisl/viz/processors/bands.py#L101

I forgot, that should solve it.

zerothi commented 1 month ago

done!