Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mathause/mplotutils
helper functions for cartopy and matplotlib
https://github.com/mathause/mplotutils
cartopy helper-functions matplotlib python3
Last synced: 2 months ago
JSON representation
helper functions for cartopy and matplotlib
- Host: GitHub
- URL: https://github.com/mathause/mplotutils
- Owner: mathause
- License: mit
- Created: 2018-03-07T16:17:46.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T19:21:12.000Z (7 months ago)
- Last Synced: 2024-06-11T17:00:55.569Z (7 months ago)
- Topics: cartopy, helper-functions, matplotlib, python3
- Language: Python
- Size: 1.23 MB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mplotutils
> *helper functions for cartopy and matplotlib*
## fix layout for cartopy axes and colorbars
This package solves two main problems for plots with maps created with cartopy. Because these plots have a fixed aspect ratio (1) colorbars will extend beyond the visible axes and (2) the distance between individual subplots will seemingly be random.
**subplots**
Without mplotutils | With mplotutils
:-------------------------:|:-------------------------:
|The code to create the examples can be found in [docs/example.py](docs/example.py).
**axes_grid**
Matplotlib's [axes_grid](https://matplotlib.org/stable/users/explain/toolkits/axes_grid.html) can also display data with a fixed aspect ratio. However, the size of the figure will not be correct. mplotutils (from version 0.6) can also help with this
| Axes grid - without mplotutils | Axes grid - with mplotutils |
| :--------------------------------: | :-------------------------: |
| | |The code to create the example can be found in [docs/example_axes_grid.py](docs/example_axes_grid.py).
## hatching
mplotutils (from version 0.6) includes helper functions to draw hatches and add stippling:
The code to create the example can be found in [docs/example_hatch.py](docs/example_hatch.py).
## Installation
See [docs/installation.md](docs/installation.md).
## Changelog
See [CHANGELOG.md](CHANGELOG.md).
## History
This package bases on functions developped for the [python visualisation workshop at C2SM](https://github.com/C2SM/pyvis/).