myplotlib 1.1.1__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- myplotlib-1.3.0/.github/workflows/pypi-publish.yml +15 -0
- myplotlib-1.3.0/.gitignore +169 -0
- myplotlib-1.3.0/MANIFEST.in +6 -0
- myplotlib-1.3.0/PKG-INFO +111 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/README.md +1 -1
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/__init__.py +11 -15
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/plots.py +1 -1
- myplotlib-1.3.0/previews/None.jpg +0 -0
- myplotlib-1.3.0/previews/README.md +28 -0
- myplotlib-1.3.0/previews/export_previews.py +29 -0
- myplotlib-1.3.0/previews/fancy_dark.jpg +0 -0
- myplotlib-1.3.0/previews/fancy_light.jpg +0 -0
- myplotlib-1.3.0/previews/hershey_dark.jpg +0 -0
- myplotlib-1.3.0/previews/hershey_light.jpg +0 -0
- myplotlib-1.3.0/previews/mono_dark.jpg +0 -0
- myplotlib-1.3.0/previews/mono_light.jpg +0 -0
- myplotlib-1.3.0/pyproject.toml +40 -0
- myplotlib-1.1.1/MANIFEST.in +0 -3
- myplotlib-1.1.1/PKG-INFO +0 -70
- myplotlib-1.1.1/myplotlib.egg-info/PKG-INFO +0 -70
- myplotlib-1.1.1/myplotlib.egg-info/SOURCES.txt +0 -42
- myplotlib-1.1.1/myplotlib.egg-info/dependency_links.txt +0 -1
- myplotlib-1.1.1/myplotlib.egg-info/requires.txt +0 -6
- myplotlib-1.1.1/myplotlib.egg-info/top_level.txt +0 -1
- myplotlib-1.1.1/myplotlib.egg-info/zip-safe +0 -1
- myplotlib-1.1.1/pyproject.toml +0 -3
- myplotlib-1.1.1/setup.cfg +0 -32
- {myplotlib-1.1.1 → myplotlib-1.3.0}/LICENSE +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/bipolar.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/colt.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/fire.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/idl.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/sunrise.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/thermal.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/colormaps/vanilla.csv +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fancy.dark.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fancy.light.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/AppleChancery.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-Bold.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-BoldItalic.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-ExtraBold.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-ExtraBoldItalic.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-Italic.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-Medium.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-MediumItalic.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-Regular.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-SemiBold.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/EBGaramond-SemiBoldItalic.ttf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/HersheyTex-Book.otf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/fonts/HersheyTex-Light.otf +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/hershey.dark.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/hershey.light.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/mono.dark.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/assets/mono.light.mplstyle +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/tests.py +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/tools/__init__.py +0 -0
- {myplotlib-1.1.1 → myplotlib-1.3.0}/myplotlib/tools/lic.py +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Python package
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v3
|
|
11
|
+
- name: Publish package
|
|
12
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
13
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
14
|
+
with:
|
|
15
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
__pycache__
|
|
2
|
+
.ipynb_checkpoints
|
|
3
|
+
*.pyc
|
|
4
|
+
|
|
5
|
+
*.swp
|
|
6
|
+
|
|
7
|
+
.DS_Store
|
|
8
|
+
|
|
9
|
+
*.egg-info/
|
|
10
|
+
build/
|
|
11
|
+
|
|
12
|
+
*.ipynb
|
|
13
|
+
|
|
14
|
+
.vscode
|
|
15
|
+
*.drawio
|
|
16
|
+
*.ipynb
|
|
17
|
+
|
|
18
|
+
# Byte-compiled / optimized / DLL files
|
|
19
|
+
__pycache__/
|
|
20
|
+
*.py[cod]
|
|
21
|
+
*$py.class
|
|
22
|
+
|
|
23
|
+
# C extensions
|
|
24
|
+
*.so
|
|
25
|
+
|
|
26
|
+
# Distribution / packaging
|
|
27
|
+
.Python
|
|
28
|
+
build/
|
|
29
|
+
develop-eggs/
|
|
30
|
+
downloads/
|
|
31
|
+
eggs/
|
|
32
|
+
.eggs/
|
|
33
|
+
lib/
|
|
34
|
+
lib64/
|
|
35
|
+
parts/
|
|
36
|
+
sdist/
|
|
37
|
+
var/
|
|
38
|
+
wheels/
|
|
39
|
+
share/python-wheels/
|
|
40
|
+
*.egg-info/
|
|
41
|
+
.installed.cfg
|
|
42
|
+
*.egg
|
|
43
|
+
MANIFEST
|
|
44
|
+
|
|
45
|
+
# PyInstaller
|
|
46
|
+
# Usually these files are written by a python script from a template
|
|
47
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
48
|
+
*.manifest
|
|
49
|
+
*.spec
|
|
50
|
+
|
|
51
|
+
# Installer logs
|
|
52
|
+
pip-log.txt
|
|
53
|
+
pip-delete-this-directory.txt
|
|
54
|
+
|
|
55
|
+
# Unit test / coverage reports
|
|
56
|
+
htmlcov/
|
|
57
|
+
.tox/
|
|
58
|
+
.nox/
|
|
59
|
+
.coverage
|
|
60
|
+
.coverage.*
|
|
61
|
+
.cache
|
|
62
|
+
nosetests.xml
|
|
63
|
+
coverage.xml
|
|
64
|
+
*.cover
|
|
65
|
+
*.py,cover
|
|
66
|
+
.hypothesis/
|
|
67
|
+
.pytest_cache/
|
|
68
|
+
cover/
|
|
69
|
+
|
|
70
|
+
# Translations
|
|
71
|
+
*.mo
|
|
72
|
+
*.pot
|
|
73
|
+
|
|
74
|
+
# Django stuff:
|
|
75
|
+
*.log
|
|
76
|
+
local_settings.py
|
|
77
|
+
db.sqlite3
|
|
78
|
+
db.sqlite3-journal
|
|
79
|
+
|
|
80
|
+
# Flask stuff:
|
|
81
|
+
instance/
|
|
82
|
+
.webassets-cache
|
|
83
|
+
|
|
84
|
+
# Scrapy stuff:
|
|
85
|
+
.scrapy
|
|
86
|
+
|
|
87
|
+
# Sphinx documentation
|
|
88
|
+
docs/_build/
|
|
89
|
+
|
|
90
|
+
# PyBuilder
|
|
91
|
+
.pybuilder/
|
|
92
|
+
target/
|
|
93
|
+
|
|
94
|
+
# Jupyter Notebook
|
|
95
|
+
.ipynb_checkpoints
|
|
96
|
+
|
|
97
|
+
# IPython
|
|
98
|
+
profile_default/
|
|
99
|
+
ipython_config.py
|
|
100
|
+
|
|
101
|
+
# pyenv
|
|
102
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
103
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
104
|
+
# .python-version
|
|
105
|
+
|
|
106
|
+
# pipenv
|
|
107
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
108
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
109
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
110
|
+
# install all needed dependencies.
|
|
111
|
+
#Pipfile.lock
|
|
112
|
+
|
|
113
|
+
# poetry
|
|
114
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
115
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
116
|
+
# commonly ignored for libraries.
|
|
117
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
118
|
+
#poetry.lock
|
|
119
|
+
|
|
120
|
+
# pdm
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
122
|
+
#pdm.lock
|
|
123
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
124
|
+
# in version control.
|
|
125
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
126
|
+
.pdm.toml
|
|
127
|
+
|
|
128
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
129
|
+
__pypackages__/
|
|
130
|
+
|
|
131
|
+
# Celery stuff
|
|
132
|
+
celerybeat-schedule
|
|
133
|
+
celerybeat.pid
|
|
134
|
+
|
|
135
|
+
# SageMath parsed files
|
|
136
|
+
*.sage.py
|
|
137
|
+
|
|
138
|
+
# Environments
|
|
139
|
+
.env
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
myplotlib-1.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: myplotlib
|
|
3
|
+
Version: 1.3.0
|
|
4
|
+
Summary: `matplotlib` binder with custom styles and routines for fast plotting
|
|
5
|
+
Project-URL: Repository, https://github.com/haykh/myplotlib
|
|
6
|
+
Author-email: Hayk <haykh.astro@gmail.com>
|
|
7
|
+
Maintainer-email: Hayk <haykh.astro@gmail.com>
|
|
8
|
+
License: BSD 3-Clause License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2023, Hayk Hakobyan
|
|
11
|
+
|
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
|
14
|
+
|
|
15
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
16
|
+
list of conditions and the following disclaimer.
|
|
17
|
+
|
|
18
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
19
|
+
this list of conditions and the following disclaimer in the documentation
|
|
20
|
+
and/or other materials provided with the distribution.
|
|
21
|
+
|
|
22
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
23
|
+
contributors may be used to endorse or promote products derived from
|
|
24
|
+
this software without specific prior written permission.
|
|
25
|
+
|
|
26
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
27
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
28
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
29
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
30
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
31
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
32
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
33
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
34
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
35
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
36
|
+
License-File: LICENSE
|
|
37
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
38
|
+
Classifier: Framework :: Matplotlib
|
|
39
|
+
Classifier: Intended Audience :: Education
|
|
40
|
+
Classifier: Intended Audience :: Science/Research
|
|
41
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
42
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
47
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
48
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
49
|
+
Requires-Python: >=3.8
|
|
50
|
+
Requires-Dist: matplotlib>=3.5.0
|
|
51
|
+
Requires-Dist: numba>=0.57.0
|
|
52
|
+
Requires-Dist: numpy
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# `myplotlib`
|
|
56
|
+
|
|
57
|
+
`matplotlib` binder with custom styles and routines for fast plotting. see [previews of available styles](https://github.com/haykh/myplotlib/tree/master/previews#readme).
|
|
58
|
+
|
|
59
|
+
### installation
|
|
60
|
+
|
|
61
|
+
```shell
|
|
62
|
+
pip install myplotlib
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### usage
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
# initialize style:
|
|
69
|
+
import myplotlib
|
|
70
|
+
myplotlib.load(style=..., flavor=...)
|
|
71
|
+
# style can be [None | `fancy` | `mono` | `hershey`]
|
|
72
|
+
# flavor can be [None | `light` | `dark`]
|
|
73
|
+
# if not specified defaults to `style = None, flavor = None`
|
|
74
|
+
|
|
75
|
+
# auxiliary functions for plotting:
|
|
76
|
+
import myplotlib.plots as myplt
|
|
77
|
+
# type for docstring:
|
|
78
|
+
myplt?
|
|
79
|
+
|
|
80
|
+
# preview custom styles with built-in functions
|
|
81
|
+
import myplotlib.tests as mypltest
|
|
82
|
+
# type for docstring:
|
|
83
|
+
mypltest?
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
for more usage examples checkout the `tests/` submodule.
|
|
87
|
+
|
|
88
|
+
### requirements
|
|
89
|
+
|
|
90
|
+
* `python >= 3.8`
|
|
91
|
+
* `matplotlib >= 3.0.0`, `numpy`
|
|
92
|
+
* `latex` (used for `style="fancy"` only)
|
|
93
|
+
* `numba>=0.57.0`
|
|
94
|
+
|
|
95
|
+
### development
|
|
96
|
+
|
|
97
|
+
Building tarballs in the `dist` directory:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
python -m build --sdist --outdir dist .
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### To-do
|
|
104
|
+
|
|
105
|
+
- [ ] isocontour plotting
|
|
106
|
+
- [x] add streamplot for fieldline plotting
|
|
107
|
+
- [x] print all the newly added colormaps and the default color sequence
|
|
108
|
+
- [x] add a test plot for the demo
|
|
109
|
+
- [x] add image to readme
|
|
110
|
+
- [x] dark mode
|
|
111
|
+
- [x] monotype non-Latex mode
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
__version__ = "1.1.1"
|
|
1
|
+
__version__ = "1.3.0"
|
|
4
2
|
|
|
5
3
|
CUSTOM_CMAPS = []
|
|
6
4
|
|
|
@@ -29,20 +27,19 @@ def __InstallCmapFromCSV(csv):
|
|
|
29
27
|
import os
|
|
30
28
|
import numpy as np
|
|
31
29
|
import matplotlib as mpl
|
|
32
|
-
import matplotlib.pyplot as plt
|
|
33
30
|
|
|
34
31
|
cmap = os.path.splitext(os.path.basename(csv))[0]
|
|
35
32
|
cmap_data = np.loadtxt(csv, delimiter=",")
|
|
36
|
-
if cmap not in
|
|
33
|
+
if cmap not in mpl.colormaps.keys():
|
|
37
34
|
CUSTOM_CMAPS.append(cmap)
|
|
38
35
|
mpl_data = __RGBToPyCmap(cmap_data)
|
|
39
|
-
|
|
36
|
+
mpl.colormaps.register(
|
|
40
37
|
cmap=mpl.colors.LinearSegmentedColormap(cmap, mpl_data, cmap_data.shape[0])
|
|
41
38
|
)
|
|
42
39
|
cmap = f"{cmap}_r"
|
|
43
|
-
if cmap not in
|
|
40
|
+
if cmap not in mpl.colormaps.keys():
|
|
44
41
|
mpl_data_r = __RGBToPyCmap(cmap_data[::-1, :])
|
|
45
|
-
|
|
42
|
+
mpl.colormaps.register(
|
|
46
43
|
cmap=mpl.colors.LinearSegmentedColormap(
|
|
47
44
|
cmap, mpl_data_r, cmap_data.shape[0]
|
|
48
45
|
)
|
|
@@ -61,21 +58,20 @@ def load(style=None, flavor="light"):
|
|
|
61
58
|
flavor ['light'] ............ : color flavor to load (options: 'light', 'dark')
|
|
62
59
|
"""
|
|
63
60
|
import os
|
|
64
|
-
import pkg_resources
|
|
65
61
|
from matplotlib import font_manager
|
|
66
62
|
import matplotlib.pyplot as plt
|
|
67
63
|
|
|
68
|
-
CMAP_DIR =
|
|
69
|
-
CMAPS =
|
|
64
|
+
CMAP_DIR = os.path.join(os.path.dirname(__file__), "assets/colormaps")
|
|
65
|
+
CMAPS = os.listdir(CMAP_DIR)
|
|
70
66
|
for cmap in CMAPS:
|
|
71
67
|
cmapname = os.path.join(CMAP_DIR, cmap)
|
|
72
68
|
__InstallCmapFromCSV(cmapname)
|
|
73
|
-
FONT_DIR =
|
|
69
|
+
FONT_DIR = os.path.join(os.path.dirname(__file__), "assets/fonts")
|
|
74
70
|
font_files = font_manager.findSystemFonts(fontpaths=[FONT_DIR])
|
|
75
71
|
for font_file in font_files:
|
|
76
72
|
font_manager.fontManager.addfont(font_file)
|
|
77
73
|
if style is not None:
|
|
78
|
-
MPLSTYLE_FILE =
|
|
79
|
-
|
|
74
|
+
MPLSTYLE_FILE = os.path.join(
|
|
75
|
+
os.path.dirname(__file__), f"assets/{style}.{flavor}.mplstyle"
|
|
80
76
|
)
|
|
81
|
-
plt.style.use(MPLSTYLE_FILE
|
|
77
|
+
plt.style.use(MPLSTYLE_FILE)
|
|
@@ -336,7 +336,7 @@ def plotVectorField(
|
|
|
336
336
|
* np.abs(weights - np.average(weights)) ** lic_contrast
|
|
337
337
|
)
|
|
338
338
|
colors = matplotlib.colors.Normalize(None, None)(_)
|
|
339
|
-
colors =
|
|
339
|
+
colors = matplotlib.colormaps[lic_cmap](colors)
|
|
340
340
|
colors[..., -1] = alphas
|
|
341
341
|
|
|
342
342
|
colorbar = plot2d(
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# `fancy.light`
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
# `mono.dark`
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
# `mono.light`
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
# `fancy.dark`
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
# `hershey.light`
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
# `hershey.dark`
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
# `None`
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import matplotlib as mpl
|
|
3
|
+
import matplotlib.pyplot as plt
|
|
4
|
+
|
|
5
|
+
import myplotlib
|
|
6
|
+
import myplotlib.tests as mypltests
|
|
7
|
+
|
|
8
|
+
if __name__ == "__main__":
|
|
9
|
+
readme = ""
|
|
10
|
+
|
|
11
|
+
for st, fl in [
|
|
12
|
+
f.replace(".mplstyle", "").split(".")
|
|
13
|
+
for f in os.listdir("myplotlib/assets")
|
|
14
|
+
if f.endswith(".mplstyle")
|
|
15
|
+
]:
|
|
16
|
+
mpl.rcParams.update(mpl.rcParamsDefault)
|
|
17
|
+
myplotlib.load(st, fl)
|
|
18
|
+
mypltests.testAll()
|
|
19
|
+
plt.savefig(f"previews/{st}_{fl}.jpg")
|
|
20
|
+
readme += f"# `{st}.{fl}`\n\n\n\n"
|
|
21
|
+
|
|
22
|
+
mpl.rcParams.update(mpl.rcParamsDefault)
|
|
23
|
+
myplotlib.load(None, None)
|
|
24
|
+
mypltests.testAll()
|
|
25
|
+
plt.savefig(f"previews/None.jpg")
|
|
26
|
+
readme += f"# `None`\n\n\n\n"
|
|
27
|
+
|
|
28
|
+
with open("previews/README.md", "w") as f:
|
|
29
|
+
f.write(readme)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "myplotlib"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
dependencies = ["matplotlib>=3.5.0", "numpy", "numba>=0.57.0"]
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
authors = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
|
|
11
|
+
maintainers = [{ name = "Hayk", email = "haykh.astro@gmail.com" }]
|
|
12
|
+
description = "`matplotlib` binder with custom styles and routines for fast plotting"
|
|
13
|
+
readme = "README.md"
|
|
14
|
+
license = { file = "LICENSE" }
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
|
+
"Intended Audience :: Science/Research",
|
|
18
|
+
"Intended Audience :: Education",
|
|
19
|
+
"Topic :: Scientific/Engineering :: Visualization",
|
|
20
|
+
"Framework :: Matplotlib",
|
|
21
|
+
"License :: OSI Approved :: BSD License",
|
|
22
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
+
"Programming Language :: Python :: 3.8",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Repository = "https://github.com/haykh/myplotlib"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.version]
|
|
34
|
+
path = "myplotlib/__init__.py"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools]
|
|
37
|
+
include-package-data = true
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["myplotlib/assets", "myplotlib/assets/fonts", "myplotlib/assets/colormaps"]
|
myplotlib-1.1.1/MANIFEST.in
DELETED
myplotlib-1.1.1/PKG-INFO
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: myplotlib
|
|
3
|
-
Version: 1.1.1
|
|
4
|
-
Summary: `matplotlib` binder with custom styles and routines for fast plotting
|
|
5
|
-
Home-page: https://github.com/haykh/myplotlib
|
|
6
|
-
Author: morninbru
|
|
7
|
-
Author-email: haykh.astro@gmail.com
|
|
8
|
-
License: BSD 3-Clause License
|
|
9
|
-
Requires-Python: >=3.6
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
Provides-Extra: dev
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
|
|
14
|
-
# `myplotlib`
|
|
15
|
-
|
|
16
|
-
`matplotlib` binder with custom styles and routines for fast plotting. see [previews of available styles](https://github.com/haykh/myplotlib/tree/master/previews#readme).
|
|
17
|
-
|
|
18
|
-
### installation
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
pip install myplotlib
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### usage
|
|
25
|
-
|
|
26
|
-
```python
|
|
27
|
-
# initialize style:
|
|
28
|
-
import myplotlib
|
|
29
|
-
myplotlib.load(style=..., flavor=...)
|
|
30
|
-
# style can be [None | `fancy` | `mono` | `hershey`]
|
|
31
|
-
# flavor can be [None | `light` | `dark`]
|
|
32
|
-
# if not specified defaults to `style = None, flavor = None`
|
|
33
|
-
|
|
34
|
-
# auxiliary functions for plotting:
|
|
35
|
-
import myplotlib.plots as myplt
|
|
36
|
-
# type for docstring:
|
|
37
|
-
myplt?
|
|
38
|
-
|
|
39
|
-
# preview custom styles with built-in functions
|
|
40
|
-
import myplotlib.tests as mypltest
|
|
41
|
-
# type for docstring:
|
|
42
|
-
mypltest?
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
for more usage examples checkout the `tests/` submodule.
|
|
46
|
-
|
|
47
|
-
### requirements
|
|
48
|
-
|
|
49
|
-
* `python >= 3.6`
|
|
50
|
-
* `matplotlib >= 3.0.0`, `numpy`
|
|
51
|
-
* `latex` (used for `style="fancy"` only)
|
|
52
|
-
* `numba>=0.57.0`
|
|
53
|
-
|
|
54
|
-
### development
|
|
55
|
-
|
|
56
|
-
Building tarballs in the `dist` directory:
|
|
57
|
-
|
|
58
|
-
```sh
|
|
59
|
-
python -m build --sdist --outdir dist .
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### To-do
|
|
63
|
-
|
|
64
|
-
- [ ] isocontour plotting
|
|
65
|
-
- [x] add streamplot for fieldline plotting
|
|
66
|
-
- [x] print all the newly added colormaps and the default color sequence
|
|
67
|
-
- [x] add a test plot for the demo
|
|
68
|
-
- [x] add image to readme
|
|
69
|
-
- [x] dark mode
|
|
70
|
-
- [x] monotype non-Latex mode
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: myplotlib
|
|
3
|
-
Version: 1.1.1
|
|
4
|
-
Summary: `matplotlib` binder with custom styles and routines for fast plotting
|
|
5
|
-
Home-page: https://github.com/haykh/myplotlib
|
|
6
|
-
Author: morninbru
|
|
7
|
-
Author-email: haykh.astro@gmail.com
|
|
8
|
-
License: BSD 3-Clause License
|
|
9
|
-
Requires-Python: >=3.6
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
Provides-Extra: dev
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
|
|
14
|
-
# `myplotlib`
|
|
15
|
-
|
|
16
|
-
`matplotlib` binder with custom styles and routines for fast plotting. see [previews of available styles](https://github.com/haykh/myplotlib/tree/master/previews#readme).
|
|
17
|
-
|
|
18
|
-
### installation
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
pip install myplotlib
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### usage
|
|
25
|
-
|
|
26
|
-
```python
|
|
27
|
-
# initialize style:
|
|
28
|
-
import myplotlib
|
|
29
|
-
myplotlib.load(style=..., flavor=...)
|
|
30
|
-
# style can be [None | `fancy` | `mono` | `hershey`]
|
|
31
|
-
# flavor can be [None | `light` | `dark`]
|
|
32
|
-
# if not specified defaults to `style = None, flavor = None`
|
|
33
|
-
|
|
34
|
-
# auxiliary functions for plotting:
|
|
35
|
-
import myplotlib.plots as myplt
|
|
36
|
-
# type for docstring:
|
|
37
|
-
myplt?
|
|
38
|
-
|
|
39
|
-
# preview custom styles with built-in functions
|
|
40
|
-
import myplotlib.tests as mypltest
|
|
41
|
-
# type for docstring:
|
|
42
|
-
mypltest?
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
for more usage examples checkout the `tests/` submodule.
|
|
46
|
-
|
|
47
|
-
### requirements
|
|
48
|
-
|
|
49
|
-
* `python >= 3.6`
|
|
50
|
-
* `matplotlib >= 3.0.0`, `numpy`
|
|
51
|
-
* `latex` (used for `style="fancy"` only)
|
|
52
|
-
* `numba>=0.57.0`
|
|
53
|
-
|
|
54
|
-
### development
|
|
55
|
-
|
|
56
|
-
Building tarballs in the `dist` directory:
|
|
57
|
-
|
|
58
|
-
```sh
|
|
59
|
-
python -m build --sdist --outdir dist .
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### To-do
|
|
63
|
-
|
|
64
|
-
- [ ] isocontour plotting
|
|
65
|
-
- [x] add streamplot for fieldline plotting
|
|
66
|
-
- [x] print all the newly added colormaps and the default color sequence
|
|
67
|
-
- [x] add a test plot for the demo
|
|
68
|
-
- [x] add image to readme
|
|
69
|
-
- [x] dark mode
|
|
70
|
-
- [x] monotype non-Latex mode
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
|
-
README.md
|
|
4
|
-
pyproject.toml
|
|
5
|
-
setup.cfg
|
|
6
|
-
myplotlib/__init__.py
|
|
7
|
-
myplotlib/plots.py
|
|
8
|
-
myplotlib/tests.py
|
|
9
|
-
myplotlib.egg-info/PKG-INFO
|
|
10
|
-
myplotlib.egg-info/SOURCES.txt
|
|
11
|
-
myplotlib.egg-info/dependency_links.txt
|
|
12
|
-
myplotlib.egg-info/requires.txt
|
|
13
|
-
myplotlib.egg-info/top_level.txt
|
|
14
|
-
myplotlib.egg-info/zip-safe
|
|
15
|
-
myplotlib/assets/fancy.dark.mplstyle
|
|
16
|
-
myplotlib/assets/fancy.light.mplstyle
|
|
17
|
-
myplotlib/assets/hershey.dark.mplstyle
|
|
18
|
-
myplotlib/assets/hershey.light.mplstyle
|
|
19
|
-
myplotlib/assets/mono.dark.mplstyle
|
|
20
|
-
myplotlib/assets/mono.light.mplstyle
|
|
21
|
-
myplotlib/assets/colormaps/bipolar.csv
|
|
22
|
-
myplotlib/assets/colormaps/colt.csv
|
|
23
|
-
myplotlib/assets/colormaps/fire.csv
|
|
24
|
-
myplotlib/assets/colormaps/idl.csv
|
|
25
|
-
myplotlib/assets/colormaps/sunrise.csv
|
|
26
|
-
myplotlib/assets/colormaps/thermal.csv
|
|
27
|
-
myplotlib/assets/colormaps/vanilla.csv
|
|
28
|
-
myplotlib/assets/fonts/AppleChancery.ttf
|
|
29
|
-
myplotlib/assets/fonts/EBGaramond-Bold.ttf
|
|
30
|
-
myplotlib/assets/fonts/EBGaramond-BoldItalic.ttf
|
|
31
|
-
myplotlib/assets/fonts/EBGaramond-ExtraBold.ttf
|
|
32
|
-
myplotlib/assets/fonts/EBGaramond-ExtraBoldItalic.ttf
|
|
33
|
-
myplotlib/assets/fonts/EBGaramond-Italic.ttf
|
|
34
|
-
myplotlib/assets/fonts/EBGaramond-Medium.ttf
|
|
35
|
-
myplotlib/assets/fonts/EBGaramond-MediumItalic.ttf
|
|
36
|
-
myplotlib/assets/fonts/EBGaramond-Regular.ttf
|
|
37
|
-
myplotlib/assets/fonts/EBGaramond-SemiBold.ttf
|
|
38
|
-
myplotlib/assets/fonts/EBGaramond-SemiBoldItalic.ttf
|
|
39
|
-
myplotlib/assets/fonts/HersheyTex-Book.otf
|
|
40
|
-
myplotlib/assets/fonts/HersheyTex-Light.otf
|
|
41
|
-
myplotlib/tools/__init__.py
|
|
42
|
-
myplotlib/tools/lic.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
myplotlib
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
myplotlib-1.1.1/pyproject.toml
DELETED
myplotlib-1.1.1/setup.cfg
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
name = myplotlib
|
|
3
|
-
version = attr: myplotlib.__version__
|
|
4
|
-
url = https://github.com/haykh/myplotlib
|
|
5
|
-
description = `matplotlib` binder with custom styles and routines for fast plotting
|
|
6
|
-
long_description = file: README.md
|
|
7
|
-
long_description_content_type = text/markdown
|
|
8
|
-
author = morninbru
|
|
9
|
-
author_email = haykh.astro@gmail.com
|
|
10
|
-
license = BSD 3-Clause License
|
|
11
|
-
|
|
12
|
-
[options]
|
|
13
|
-
zip_safe = True
|
|
14
|
-
python_requires = >=3.6
|
|
15
|
-
packages = find:
|
|
16
|
-
include_package_data = True
|
|
17
|
-
install_requires =
|
|
18
|
-
matplotlib>=3.0.0
|
|
19
|
-
numpy
|
|
20
|
-
numba>=0.57.0
|
|
21
|
-
|
|
22
|
-
[options.package_data]
|
|
23
|
-
myplotlib = assets/colormaps/*.csv, fonts/*.ttf, *.mplstyle
|
|
24
|
-
|
|
25
|
-
[options.extras_require]
|
|
26
|
-
dev =
|
|
27
|
-
black
|
|
28
|
-
|
|
29
|
-
[egg_info]
|
|
30
|
-
tag_build =
|
|
31
|
-
tag_date = 0
|
|
32
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|