Skip to main content

Cyberpunk-style Matplotlib/Seaborn and Plotly themes

Project description

Styles for Matplotlib, Seaborn and Plotly.


Quickstart

pip install spektra
# OR
uv add spektra

Usage

import spektra as sk
import matplotlib.pyplot as plt

# One of ['ember', 'neon', 'ash', 'raiden', 'sakura']
sk.style('ember')  

plt.plot([1, 2, 3], [1, 4, 9])
plt.show()

Quickview:

print(sk.get_available_themes())
# ['sakura', 'neon', 'ash', 'raiden', 'ember']

print(sk.get_theme())
# ember

print(sk.get_cmap())
# <matplotlib.colors.LinearSegmentedColormap object at 0x10d6ae750>

print(sk.get_palette(n=5))
# ['#FF003C', '#FF00FF', '#00F3FF', '#FFEA00', '#00FF41']

# Config as dict
print(sk.get_config())
#{'name': 'ember', 'colors': {'bg': '#050505', 'accent': '#FF003C', 'secondary': '#9D0025', 'text': '#FF003C', 'grid': '#1A0006'},
# 'palette': ['#FF003C', '#FF00FF', '#00F3FF', '#FFEA00', '#00FF41', '#FF9500'], 'settings': {'alpha': 0.4, 'op': 0.4, 'font': 
# 'monospace'}, 'matplotlib': {'figure.facecolor': '#050505', 'axes.facecolor': '#050505', 'axes.edgecolor': '#444444', 'axes.
# labelcolor': '#FF003C', 'axes.titlesize': 10, 'axes.titleweight': 'bold', 'grid.color': '#1A0006', 'grid.alpha': 0.3, 'grid.
# linestyle': ':', 'xtick.color': '#FF003C', 'ytick.color': '#FF003C', 'text.color': '#FF003C', 'font.family': 'monospace', 'axes.
# spines.top': False, 'axes.spines.right': False, 'lines.color': '#FF003C', 'lines.marker': 's', 'lines.markersize': 4, 'patch.
# facecolor': '#FF003C', 'patch.edgecolor': '#050505', 'scatter.marker': 's', 'scatter.edgecolors': '#FF003C'}, 'plotly': 
# {'paper_bgcolor': '#050505', 'plot_bgcolor': '#050505', 'font_color': '#FF003C', 'font_family': 'Roboto Mono, Cascadia Code, 
# Source Code Pro, Courier New, monospace', 'grid_color': '#1A0006', 'axis_line_color': '#444444'}, 'cmap': <matplotlib.colors.
# LinearSegmentedColormap object at 0x1083e7d40>}

Theme Files

All theme files are stored under their respective spektra/themes/{THEME_NAME}.json file. They're stored as JSON for ease of reusability between Maplotlib/Seaborn and Plotly. spektra scans the directory, so adding a .json file to it will register a new theme.

License

Apache 2.0

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

spektra-0.1.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

spektra-0.1.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file spektra-0.1.2.tar.gz.

File metadata

  • Download URL: spektra-0.1.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for spektra-0.1.2.tar.gz
Algorithm Hash digest
SHA256 71883c5108a0b7b3a73906298ce56fdfcd66f9edfd838d8ed813da73499a4a58
MD5 514afcb1faece322594eb78e80a82089
BLAKE2b-256 ddc13e7f3f19dd71513a9b94bc8278ff96e68aa832c1a583eabb3e1e75c3d4a3

See more details on using hashes here.

File details

Details for the file spektra-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spektra-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for spektra-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62266079c53a0af7f8eaeda1271b02ad2b12de7589f2693c7f192aa099c3b589
MD5 8a1d494c394608f508127a12024e5855
BLAKE2b-256 203bdc3e50bc65e53300f0db559d870d65c268e60d8441a87679b2a4426ed503

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