Skip to main content

A simple helper package to adjust matplotlib plots to fit in LaTeX documents

Project description

latex-plot-styles

This project can be used to makte plots created with matplotlib nicer. It simplifys the styling options by providing a nice default configuration for thesis.

setup

latex-plot-styles can pe installed using pip:

pip install latex-plot-styles

To use the full functionality you need a running LaTeX installation on your system. On Debian based systems this can be installed using:

sudo apt install texlive-full

usage

Instead of configuring the styles and sizes for all your plots you can just do

import latex_plot_styles as lps
import matplotlib.pyplot as plt

lps.set_style()
fig, ax = plt.subplots(1, 1, figsize=lps.get_size())
...
plt.savefig("your_fig.pdf", bbox_inches="tight")

configure your own styles

To configure your own styles you have to create an object from class Config and give this config object to lps.set_style(your_config_object)

warning

This is just a small side project to simlify generating plots for my masters thesis. There are no automated tests, this is not ment for production, but feel free to use and adapt it for your own stuff.

changelog

0.1.0 basic funcitionality for matplotlib styles 0.1.1 fix typo in package name

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

latex_plot_styles-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

latex_plot_styles-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file latex_plot_styles-0.1.1.tar.gz.

File metadata

  • Download URL: latex_plot_styles-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for latex_plot_styles-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f3c2c7ade84de047b7879a4519fbff1ab5573d8d7ab2c2fcf2d2a546c6592a5a
MD5 31c9ddbcc950a8075e8b88682d3266bb
BLAKE2b-256 41364154db453e6761d79f30955c42146bf159ebc3223d43d6960e65d671ebd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for latex_plot_styles-0.1.1.tar.gz:

Publisher: push_release_to_pypi.yml on tobiweisss/latex-plot-styles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file latex_plot_styles-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for latex_plot_styles-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c92e337390f9c3b058c384deb1e0524a243557b08777a9e775664d45c82beb9
MD5 17f4bcdc2836766143361626f95727f8
BLAKE2b-256 1b2b9e1050e82e713d9c8d7acabea1a9d428a97a4e6a7f61e59b363767938ca3

See more details on using hashes here.

Provenance

The following attestation bundles were made for latex_plot_styles-0.1.1-py3-none-any.whl:

Publisher: push_release_to_pypi.yml on tobiweisss/latex-plot-styles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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