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},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fanda-0.2.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

fanda-0.2.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file fanda-0.2.2.tar.gz.

File metadata

  • Download URL: fanda-0.2.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for fanda-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e8fa097fb609c9718cb174aeaf6e31430b471320584b777ddb3f0173df5d4a18
MD5 15ef6c9eccefba4325e85f81a2b5fc61
BLAKE2b-256 89f6fb1235e3f762b748c5f78a937b93ce7c8c48ffac284f6060539517043d01

See more details on using hashes here.

File details

Details for the file fanda-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: fanda-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for fanda-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a87666dfe85088cb63489e03a500079e4d622e2b0f00d09256b8bce0aeef09d
MD5 c4db993e0cbd9ea7339f4f95edd1de4f
BLAKE2b-256 d6b48346b1b5a20b0cbbab2ebf2f223f80c5ec30c14817b66331161707701cb3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page