Skip to main content

Produce publication-level quality images on top of Matplotlib

Project description

Publib

Produce publication-level quality images on top of Matplotlib

For similar librairies, see seaborn, which also add neat high-end API to Matplotlib function calls.

Use

At the beginning of the script, call:

set_style()

After each new axe is plotted, call:

buff_style()

Note that importing publib will already load the default style.

A couple more styles (‘poster’, ‘article’) can be selected with the function set_style()

Because some matplotlib parameters cannot be changed before the lines are plotted, they are called through the function buff_style() which:

  • changes the minor ticks

  • remove the spines

  • turn the legend draggable by default

Examples

#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import publib
a = np.linspace(0,6.28)
plt.plot(a,np.cos(a))   # plotted by publib 'default' style
plt.show()

publib.set_style('article')
plt.plot(a,a**2)
publib.buff_style('article')
plt.show()

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

publib-0.1.4.zip (8.4 kB view details)

Uploaded Source

File details

Details for the file publib-0.1.4.zip.

File metadata

  • Download URL: publib-0.1.4.zip
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for publib-0.1.4.zip
Algorithm Hash digest
SHA256 cbfb7e64cba988e2da484fe8c3b540d5aabb4d52019220b1b49f4de5c56170fe
MD5 012e5c02ea5d30ceed6f5107d93e8ae1
BLAKE2b-256 dfb5d19d9816b3c79978e90717f77807ae57908e3e768f5771b10c8a06c2abf3

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