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 tuning matplotlib subplots. #781

Closed pfebrer closed 1 month ago

pfebrer commented 1 month ago

Now subplot kwargs are passed directly to plt.subplots in the matplotlib backend, and one can therefore pass things like gridspec_kw:

import sisl
p = sisl.geom.graphene().plot(axes="xy")
sisl.viz.subplots(p, p, rows=2, gridspec_kw={"height_ratios": [2, 1]}, backend="matplotlib")

Screenshot from 2024-05-29 22-36-13

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 87.36%. Comparing base (2b299e3) to head (f37c45d).

Files Patch % Lines
src/sisl/viz/figure/matplotlib.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #781 +/- ## ======================================= Coverage 87.36% 87.36% ======================================= Files 396 396 Lines 50706 50706 ======================================= Hits 44298 44298 Misses 6408 6408 ```

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