Skip to content
Snippets Groups Projects
Forked from kwant / kwant
Source project has a limited visibility.
  • Christoph Groth's avatar
    8ca980f7
    select matplotlib backend only when needed · 8ca980f7
    Christoph Groth authored
    Previously, in order to not to fix the matplotlib backend, we required
    users to import matplotlib.pyplot before calling any Kwant plotting
    functions.  This did not have the desired effect, since we did import
    `matplotlib.backends` and that also fixes the backend.
    
    Now, both backends and pyplot are imported at the last possible moment
    and a warning is emitted if this fixes the backend.
    8ca980f7
    History
    select matplotlib backend only when needed
    Christoph Groth authored
    Previously, in order to not to fix the matplotlib backend, we required
    users to import matplotlib.pyplot before calling any Kwant plotting
    functions.  This did not have the desired effect, since we did import
    `matplotlib.backends` and that also fixes the backend.
    
    Now, both backends and pyplot are imported at the last possible moment
    and a warning is emitted if this fixes the backend.