Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szapp/plotface
Python module to switch between light/dark interface and inline/gui backend of matplotlib figures in IPython on the fly.
https://github.com/szapp/plotface
dark-theme interactive ipython matplotlib visualization
Last synced: 12 days ago
JSON representation
Python module to switch between light/dark interface and inline/gui backend of matplotlib figures in IPython on the fly.
- Host: GitHub
- URL: https://github.com/szapp/plotface
- Owner: szapp
- License: mit
- Created: 2018-11-27T16:37:54.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T17:12:37.000Z (almost 3 years ago)
- Last Synced: 2024-11-20T19:32:58.607Z (2 months ago)
- Topics: dark-theme, interactive, ipython, matplotlib, visualization
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# plotface
Python module to switch between light/dark interface and inline/gui backend of matplotlib figures in IPython on the fly.
It is particularly useful when running a Jupyter or IPython console embedded in a dark themed shell, as for example
when using [Spyder](https://www.spyder-ide.org) with color schemes like Monokai or similar ([see below](#example)).## Installation
Clone `plotface` into a directory in your python path.
```bash
git clone https://github.com/szapp/plotface.git
cd plotface
pip install -r requirements.txt
```## Usage
```python
In [1]: import plotfaceIn [2]: plotface.dark()
In [3]: plotface.light()
In [4]: plotface.inline()
In [5]: plotface.gui()
```## Example
This example shows the aesthetic benefit of switching to a dark interface when working with the Monokai color scheme.
![](https://user-images.githubusercontent.com/20203034/49161136-87f4aa00-f328-11e8-9c79-97cb89e2688a.png)
## Saving Figures
To keep having figures saved with black lines and text regardless of light or dark interface, the module hooks the
`savefig` function of matplotlib's pyplot to replace the color of all white text and lines with black.