Skip to main content

A collection of stylesheets and default values for Python matplotlib figures.

Project description

PltStyler

A simple package to provide a collection of stylesheets and default values for Python matplotlib figures. The goal is to make it easy to create visually appealing and consistent plots with minimal effort.

I will add more stylesheets and default values in the future! If you have any suggestions or want to contribute, feel free to open an issue or a pull request.

Installation

You can install PltStyler using pip:

pip install PltStyler

Usage

To use PltStyler, simply import the desired stylesheet and apply it to your matplotlib figures. For example:

import matplotlib.pyplot as plt
from PltStyler import PltStyler

# Apply the default stylesheet
PltStyler().apply_stylesheet()

# Apply a predefined stylesheet (e.g., "dark")
PltStyler().set_stylesheet("dark").apply_stylesheet()

# Apply a custom stylesheet - must be json (see below for an example)
PltStyler().set_stylesheet("path/to/stylesheet.json").apply_stylesheet()

# Change the font
PltStyler().set_font(family="Arial", weight="normal").apply_font()

# The PltStyler inclused default parameters for the following plot types:
# - Line plots
# - Scatter plots
# - Box plots
# - Histograms

lineplot_defaults = PltStyler().get_lineplot_defaults()

# Create a sample plot
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
plt.plot(x, y, **lineplot_defaults) # apply lineplot defaults
plt.title("Sample Plot")
plt.xlabel("X-axis")
plt.ylabel("Y-axis")
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

pltstyler-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

pltstyler-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pltstyler-0.0.2.tar.gz.

File metadata

  • Download URL: pltstyler-0.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.9.9 Windows/10

File hashes

Hashes for pltstyler-0.0.2.tar.gz
Algorithm Hash digest
SHA256 774bfe86832bf9f0a327881511956e8cf9566c53f6503d2c616f383b0a458ab2
MD5 4d7623f20f454cc304c290b871b6843b
BLAKE2b-256 4b1bc5a2aef0760445ef7bcc12cd1575531434a1dc0916107e097f5e2975c3fb

See more details on using hashes here.

File details

Details for the file pltstyler-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pltstyler-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.9.9 Windows/10

File hashes

Hashes for pltstyler-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8d6d92c92ff9c0a7609ae468580c7a8ff8aaa9d2ec1d0d3e0076aa1bfd2c54
MD5 5e7a8f31ef82d220a34c0f0264c78cab
BLAKE2b-256 bb90a8f419de8e676327b05057eae19db59897cf455cac2fbfca1d106735e3c2

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