Skip to main content

Package for producing consistent figure dimensions for scientific journals

Project description

journal_styles

A package to design figures for scientific journals that authomatically adapt to each journal style.

Installation

Install the packagge via pip

pip install journal-styles

then run

python -m journal_styles install

In some older installations of jupyter or jupyterlab you may need to add the line

c.InlineBackend.rc = { }

in a configuration file that is typically found in

<home>/.ipython/profile_default/ipython_kernel_config.py

Otherwise the matplotlibrc parameters set by this package may be overridden.

Usage

Most users will only need the class Figure_Frame

import matplotlib.pyplot as plt
from journal_styles import Figure_Frame

an instance of the class for a simple figure can be initializad as

ff = Figure_Frame()

and used as

plt.figure(figsize = ff.figsize)
plt.axes(ff.rects[0])

See Figure_Frame docstring for options for more complex figures.

See the notebook examples/tutorial.ipynb in the project repository for more advanced usage.

Updating styles

python -m journal_styles update-styles

Will update the styles in the local styles directory and copy to matplotlib config directory. Run after adding or modifying journal parameters.

Uninstalling

  1. Go to matplotlib configuration directory, delete matplotlibrc file and reinstate the previous matplotlibrc file. Files that have been substituted have been backupped by appending the string _backup_<time>.
  2. Go to matplotlib configuration directory \stylelib and delete the undesired .mplstyle files.
  3. Execute
pip uninstall journal-styles

Repository

This project is developed and maintained at https://gitlab.com/itorre/journal-styles

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

journal_styles-1.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

journal_styles-1.2.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file journal_styles-1.2.0.tar.gz.

File metadata

  • Download URL: journal_styles-1.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.15 Linux/5.15.154+

File hashes

Hashes for journal_styles-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2dc778f4944f2d76ff29e9a3a8ec28b3f8d06230a4b1c88685c9c25739c7a01a
MD5 69e7d40a4ec7e37ed822a9029008aca3
BLAKE2b-256 93d99bed5a3b04f971dba9f7b4679ba4679e8b2eac907e5eabd741336e99164b

See more details on using hashes here.

File details

Details for the file journal_styles-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: journal_styles-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.15 Linux/5.15.154+

File hashes

Hashes for journal_styles-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3245071b37d7fd3466133f9ca7733e2c4ec94bfc8dfb5c87302167335321ebe6
MD5 73a87a52d1bb8913d1e29381bc7022e3
BLAKE2b-256 cc076176a3e04a9992e9e8a7af359bb21478c7aa4e700b5040c0bec5abb57450

See more details on using hashes here.

Supported by

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