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

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.0.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.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: latex_plot_styles-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 9f217153991ee4d768d01d3f1eb41d1b0a8a85044011970d54d958cea44ddaae
MD5 7c2c59afd824c085cf2be4517829e803
BLAKE2b-256 0029693e45b47a407192be629c2b97d4db57ccf159c0e23fbbdf0c5f791bf53f

See more details on using hashes here.

Provenance

The following attestation bundles were made for latex_plot_styles-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for latex_plot_styles-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 978cf6c45850681be358161c0b18e2c52559f4c0aadde8c6fe2a2bb81ccd9016
MD5 a9a4b6eaf32bba2c8e36ced4ec7ee2e1
BLAKE2b-256 fe7b476571420563f1aea4198a45e23a58a8c2009ee6ac198712b1323b3fdb46

See more details on using hashes here.

Provenance

The following attestation bundles were made for latex_plot_styles-0.1.0-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