Skip to main content

Matplotlib styles for scientific usage

Project description

Quantstyles

A set of slightly customized colormaps and styles, developed for internal use by Quantum Technology research group in the University of Rostock.

It includes the set of colormaps + custom matplotlib style.

Usage

Import the package in your script
import quantstyles
Package automatically exports all the colormaps, i.e. they could be normally used by their names, e.g.
plt.show(data, cmap="quantjet")
Custom matplotlib style will be registered during first import of the package. It can be then activated as
plt.style.use("quant")

Installation

The package is published on pypi, so it is enough to run:

pip install quantstyles

Manual installation

# clone the repo
git clone https://github.com/Trel725/quantstyles.git --recursive

# build the wheel
make

# manually install the built package
pip install dist/quantstyles-*-py3-none-any.whl

Acknoledgements

This project depends on

Development

If you'd like to manually go through all the steps:

  1. Clone the repo by git clone https://github.com/Trel725/quantstyles.git --recursive Recursive is needed to sync get-cpt repo.
  2. Generate colormaps by executing Julia code in colormaps folder
cd colormaps
julia colormaps.jl

PerceptualColourMaps.jl and PyPlot.jl need to be installed. See that code for more details, or just use pre-generated colormaps in the colormaps directory.
3. Generate Python representation of the colormaps by running python generate_quantcmaps.py. This will produce actual file containing colormaps, quantcmaps.py The command requires numpy, os, glob and (probably) urllib (from get-cpt). 4. Import quantcmaps in your script. All the listed colormaps will be available as usual, e.g. plt.imshow(data, cmap="quantjet")
5. Custom style need to be copied to the matplotlib config dir. See official manuals for details.
6. Additionally you can try to build pip wheel by executing make in the project top directory.

0.01

Initial release, includes

  • Colormaps generation
  • Packaging

0.100

  • Piblished on PyPI

0.101-0.103

  • Bug fixes

0.104

  • Added custom MPL style and its installer

0.105

  • Switched to sans-serif fonts according to Nature recommendations
  • Corrected font size for the same reason

0.106-0.107

  • Bug fixes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantstyles-0.107.tar.gz (144.8 kB view details)

Uploaded Source

Built Distribution

quantstyles-0.107-py3-none-any.whl (162.0 kB view details)

Uploaded Python 3

File details

Details for the file quantstyles-0.107.tar.gz.

File metadata

  • Download URL: quantstyles-0.107.tar.gz
  • Upload date:
  • Size: 144.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for quantstyles-0.107.tar.gz
Algorithm Hash digest
SHA256 1e05a08d18374f6dee1fcf699a80dc23df6860d0a0bd33b179741202fee2aebb
MD5 618df53c248e3b396ec822adce4c6830
BLAKE2b-256 b57da4a10ce570fbdf67a602312ad70a1d9309ca31cd50105419e5c16b9127d4

See more details on using hashes here.

File details

Details for the file quantstyles-0.107-py3-none-any.whl.

File metadata

  • Download URL: quantstyles-0.107-py3-none-any.whl
  • Upload date:
  • Size: 162.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for quantstyles-0.107-py3-none-any.whl
Algorithm Hash digest
SHA256 1b2b12c8b8c62d15a9724c0e48adb0f2a21df277ec37b67ca47906b99da4c9f6
MD5 e753aab7812dd974c4b1ec3f5b7e1e2a
BLAKE2b-256 75c930a3be4849b607e969339d6f81b524e0fbcbfc873b412d0f31a4cd222b01

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page