Skip to main content

Spiderplotlib

Simple spider/radar plots for Python with matplotlib.

Installation (using PyPI)

pip install spiderplotlib

Development (using uv)

git clone https://github.com/gabriel-jung/spiderplotlib
cd spiderplotlib
uv sync

Quick Start

import matplotlib.pyplot as plt
from spiderplotlib import spider_plot

# Algorithm performance
groups = [
    [0.89, 0.92, 0.78, 0.95, 0.88],
    [0.85, 0.88, 0.90, 0.82, 0.91],
]

labels = ['Precision', 'Recall', 'Speed', 'Memory', 'F1']

fig = spider_plot(
    groups=groups,
    labels=labels,
    title='Algorithm Comparison',
    group_names=['RF', 'XGBoost']
)

plt.show()

API Reference

spider_plot()

spider_plot(
    groups: List[Union[List[float], np.ndarray]],
    labels: List[str],
    group_names: Optional[List[str]] = None,
    group_colors: Optional[List[str]] = None,
    title: Optional[str] = None,
    show_legend: bool = True,
    show_values: bool = False,
    show_scale: bool = True,
    figsize: tuple = (8, 8),
    alpha: float = 0.3,
    grid_levels: Optional[List[float]] = None,
    value_format: str = "{:.2f}",
    label_distance: float = 1.2,
) -> mpl.figure.Figure

Parameters:

  • groups: List of groups to compare (each contains values for all axes)
  • labels: List of strings representing axis/parameter labels.
  • group_names: Optional list of labels for each group (displayed in legend).
  • group_colors: Optional list of colors for each group.
  • title: Optional plot title string.
  • show_legend: Whether to display legend (default: True).
  • show_values: Whether to display maximum values on each axis (default: False).
  • show_scale: Whether to display percentage scale indicators (default: True).
  • figsize: Figure size as (width, height) tuple (default: (8, 8)).
  • alpha: Transparency for filled areas, range 0-1 (default: 0.3).
  • grid_levels: Custom grid levels as fractions (default: [0.2, 0.4, 0.6, 0.8, 1.0]).
  • value_format: Format string for displayed values (default: "{:.2f}").
  • label_distance: Distance of labels from center (default: 1.2).

Returns:

  • matplotlib.figure.Figure: The created figure object.

Advanced Usage

Custom Colors

fig = spider_plot(
    groups=groups,
    labels=labels,
    group_colors=['#1f77b4', '#ff7f0e'],
    alpha=0.4
)

Adjust label distance

fig = spider_plot(
    groups=groups,
    labels=long_labels,
    label_distance=1.4  # Move labels further out
)

Examples

See example.py for complete working examples and example.ipynb for comprehensive exploration of features.

Metadata

Release files for spiderplotlib 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spiderplotlib 0.1.0
File Size Uploaded Provenance
spiderplotlib-0.1.0.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spiderplotlib 0.1.0
File Interpreter ABI Platform
spiderplotlib-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / spiderplotlib-0.1.0.tar.gz

Download URL spiderplotlib-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2df6b5c0457084681d25f22a05045ecf38e9105b5e98d9afc177fd715b6af160
BLAKE2b-256 checksum
How to use checksums
a038bb34d0530ddfc586c72b47925fd01f7df2efd4f896a5fc2aa6b187e4885b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / spiderplotlib-0.1.0-py3-none-any.whl

Download URL spiderplotlib-0.1.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94085298c812b1c111a686814f9105342dc3a6b9079baf136d2f7924d4dcf63a
BLAKE2b-256 checksum
How to use checksums
56678dd8186cbe7ffe6adc21f9f65b908878eb8ac21fe9f66d682255a583340b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for spiderplotlib 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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