https://github.com/cardi/matplotlib-config
my defaults for creating images in matplotlib for use in LaTeX
https://github.com/cardi/matplotlib-config
matplotlib
Last synced: 2 months ago
JSON representation
my defaults for creating images in matplotlib for use in LaTeX
- Host: GitHub
- URL: https://github.com/cardi/matplotlib-config
- Owner: cardi
- License: cc0-1.0
- Created: 2019-04-30T07:36:57.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T00:28:46.000Z (about 1 year ago)
- Last Synced: 2025-02-05T19:12:43.683Z (4 months ago)
- Topics: matplotlib
- Language: Python
- Size: 750 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# matplotlib-config
**matplotlib-config** is a set of defaults and utility functions for
[matplotlib 3+](https://www.matplotlib.org).## Dependencies
* matplotlib3.0.0+ (tested on matplotlib 3.6.2)
* python3 (tested on python 3.9.18)## Usage
Our use case in generating figures is typically one figure and
corresponding source file per directory.The easiest way to use this in your project is to copy
`local_mpl_config.py` somewhere (manually or use `git submodule`), and
then create a symlink to it in each figure's sub-directory.An example directory structure:
```
figures/sample-plot/plot.pdf
figures/sample-plot/plot.py
figures/sample-plot/local_mpl_config.py -> ../local_mpl_config.py
figures/another-example/plot.pdf
figures/another-example/plot.py
figures/another-example/local_mpl_config.py -> ../local_mpl_config.py
figures/local_mpl_config.py
```In your Python source code, the following is the minimum to get started:
```python
import local_mpl_config as lmc
lmc.initialize()
```See the [example](#example) for additional usage.
You can also generate documentation using `pydoc`:
```bash
pydoc -w local_mpl_config
```## Example
Running [example.py](example.py) will produce the following:

## Contributing
Feel free to contribute code or send comments, suggestions, bugs to
[email protected].## LICENSE
[CC0 1.0 Universal](./LICENSE)