diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 15:08:15 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 15:08:15 +0000 |
| commit | cd873b62df1cf904f08c5a5fe92aaed7c4b0ff40 (patch) | |
| tree | d17e07e2f920cd951510f8ad1a35d0deba0c9557 | |
| parent | 6cddc1be9fe3a43b3318bbba6cb6ef0a7d32fccb (diff) | |
automatic import of python-cmytopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-cmyt.spec | 343 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 345 insertions, 0 deletions
@@ -0,0 +1 @@ +/cmyt-1.2.0.tar.gz diff --git a/python-cmyt.spec b/python-cmyt.spec new file mode 100644 index 0000000..35e222d --- /dev/null +++ b/python-cmyt.spec @@ -0,0 +1,343 @@ +%global _empty_manifest_terminate_build 0 +Name: python-cmyt +Version: 1.2.0 +Release: 1 +Summary: A collection of Matplotlib colormaps from the yt project +License: BSD 3-Clause +URL: https://yt-project.org/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1d/c8/cf6f8bcef86ed426ca6de0f6d778a548ccd382374dd791b2658241fb551f/cmyt-1.2.0.tar.gz +BuildArch: noarch + +Requires: python3-colorspacious +Requires: python3-matplotlib +Requires: python3-more-itertools +Requires: python3-numpy + +%description +# cmyt + +[](https://pypi.org/project/cmyt) +[](https://anaconda.org/conda-forge/cmyt) +[](https://pypi.org/project/cmyt/) + +[](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[](https://yt-project.org) +[](https://github.com/psf/black) +[](https://github.com/charliermarsh/ruff) + +<a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a> + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a> +</p> + +### Monochromatic sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a> +</p> + +### Miscellaneous +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a> +</p> + +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a> +</p> + +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a> +</p> + +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%package -n python3-cmyt +Summary: A collection of Matplotlib colormaps from the yt project +Provides: python-cmyt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-cmyt +# cmyt + +[](https://pypi.org/project/cmyt) +[](https://anaconda.org/conda-forge/cmyt) +[](https://pypi.org/project/cmyt/) + +[](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[](https://yt-project.org) +[](https://github.com/psf/black) +[](https://github.com/charliermarsh/ruff) + +<a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a> + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a> +</p> + +### Monochromatic sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a> +</p> + +### Miscellaneous +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a> +</p> + +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a> +</p> + +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a> +</p> + +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%package help +Summary: Development documents and examples for cmyt +Provides: python3-cmyt-doc +%description help +# cmyt + +[](https://pypi.org/project/cmyt) +[](https://anaconda.org/conda-forge/cmyt) +[](https://pypi.org/project/cmyt/) + +[](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[](https://yt-project.org) +[](https://github.com/psf/black) +[](https://github.com/charliermarsh/ruff) + +<a href="http://yt-project.org"><img src="https://raw.githubusercontent.com/yt-project/yt/main/doc/source/_static/yt_logo.png" width="150"></a> + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_perceptually_uniform.png" width="800"></a> +</p> + +### Monochromatic sequential colormaps +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_pixel.png" width="800"></a> +</p> + +### Miscellaneous +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/overview_misc.png" width="800"></a> +</p> + +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo.png" width="400"></a> +</p> + +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +<p align="center"> + <img src="https://raw.githubusercontent.com/yt-project/cmyt/main/doc/demo_alt.png" width="400"></a> +</p> + +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%prep +%autosetup -n cmyt-1.2.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-cmyt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.0-1 +- Package Spec generated @@ -0,0 +1 @@ +74da58dc2b0dc053ac7d06a265695102 cmyt-1.2.0.tar.gz |
