Skip to main content

Figures and Axes

Figures and Axes (fanda) is a lightweight Python library designed to streamline the process of extracting experiment data from Weights & Biases (wandb) and generating publication-quality plots.The name is a play on "wandb" (Weights and Biases) $\rightarrow$ "fanda" (Figures and Axes).

Features

  • Seamless Extraction: Pull scalar histories, configuration configs, and summary metrics from W&B runs easily.
  • Publication Ready: Generate clean, professional figures using matplotlib and seaborn defaults tailored for academic papers.
  • Conference Styles: Built-in stylesheets for major conferences (NeurIPS, ICML, ICLR), slides, and posters to automatically handle fonts, sizes, and DPI.
  • Transformations: Easily transform your data to accelerate your analysis.

Installation

You can install fanda directly from PyPi:

pip install fanda

Configuration

Ensure you are logged into W&B before using the library:

wandb login

Usage

Here is a simple example of how to pull data from a project and plot the training loss.

import matplotlib.pyplot as plt

import fanda
from fanda.wandb_client import fetch_wandb
from fanda import transforms
from fanda.visualizations import lineplot, add_legend, annotate_axis, decorate_axis
from fanda.utils import save_fig, close_fig

plt.style.use('neurips')

df = (
    fetch_wandb("entity", "project", filters={
        "state": "finished",
        "created_at": {"$gte": "2025-01-01"},
    })
    .pipe(transforms.exponential_moving_average, column="loss", alpha=0.7)
    .pipe(transforms.remove_outliers, column="loss")
)
fanda = (
    lineplot(
        df=df,
        x="_step", 
        y="loss", 
        hue="network",
    )
    .pipe(
        annotate_axis, 
        xlabel="Number of Steps",
        ylabel="Loss",
    )
    .pipe(decorate_axis)
    .pipe(add_legend, column="algorithm")
    .pipe(save_fig, name="algorithm_comparison")
    .pipe(close_fig)
)

Example of sin and cosineExample of noisy trainingExample of algorithm comparison

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you find this tool useful for your research, please consider citing it:

@software{fanda2025github,
  author = {Noah Farr},
  title = {fanda: Figures and Axes for Weights and Biases},
  year = {2025},
  url = {https://github.com/noahfarr/fanda},
}

Metadata

Release files for fanda 0.2.2

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

Source distribution (sdist)

Source distribution for fanda 0.2.2
File Size Uploaded
fanda-0.2.2.tar.gz 5.3 kB Details

Built distribution (wheel)

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

Total release size: 11.4 kB

Release files / fanda-0.2.2.tar.gz

Download URL fanda-0.2.2.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e8fa097fb609c9718cb174aeaf6e31430b471320584b777ddb3f0173df5d4a18
BLAKE2b-256 checksum
How to use checksums
89f6fb1235e3f762b748c5f78a937b93ce7c8c48ffac284f6060539517043d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / fanda-0.2.2-py3-none-any.whl

Download URL fanda-0.2.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a87666dfe85088cb63489e03a500079e4d622e2b0f00d09256b8bce0aeef09d
BLAKE2b-256 checksum
How to use checksums
d6b48346b1b5a20b0cbbab2ebf2f223f80c5ec30c14817b66331161707701cb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release 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