Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.0.11 instead.

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()

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

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

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

# Because the PltStyler is a singleton and the methods return the instance itself, you can chain the methods together for conveniently readable code:
PltStyler().set_stylesheet("dark").set_font(family="Arial", weight="normal").apply()

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

lineplot_defaults = PltStyler().get_lineplot_defaults()

## Example
# Create sample data
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]

# Apply the stylesheet BEFORE creating the plot
PltStyler().set_stylesheet("bright").set_font(size=12, weight="bold").apply()

# Create a sample plot
fig, ax = plt.subplots(1,1, figsize=(8, 6))

# plot the data using the default parameters for line plots
lineplot_defaults = PltStyler().get_default_parameters("lineplot")
ax.plot(x, y, **lineplot_defaults)

# apply labels and title
ax.set_title("Sample Plot")
ax.set_xlabel("X-axis", fontsize=14, fontweight='bold')
ax.set_ylabel("Y-axis", fontsize=14, fontweight='bold')

plt.show()

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.10.tar.gz (9.4 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.10-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pltstyler-0.0.10.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Windows/10

File hashes

Hashes for pltstyler-0.0.10.tar.gz
Algorithm Hash digest
SHA256 adff87c04907daf0eac2a706eaa4781bf785699701da757e5e2320ad1bb6818a
MD5 3033225063057c339d7891c0efc09047
BLAKE2b-256 f6aea875c251affe7ad3b0cfbfd8fbd37cc03ba57def33aa949f4ca2ea332e5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pltstyler-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pltstyler-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b5555cc850b4f9fbcdd09596fab45ff92ff4ec5da95db3359ff97f6c9e9a6883
MD5 cba609582abb76528fc4717a6de71274
BLAKE2b-256 24b1e5a5969a7b2578dfe69b362857912e8871bcee3ec91b6a58d5be34775136

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.11

2 files

This release

0.0.10 This release

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page