python-viz

Creates matplotlib figures, animations, and plotly interactive plots for fluidpy teaching notebooks.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/shammun/fluidpy --skill python-viz-shammun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-viz
Source: https://github.com/shammun/fluidpy/tree/main/.claude/skills/python-viz
Command: npx skills add https://github.com/shammun/fluidpy --skill python-viz-shammun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the wrong visualization format breaks published notebook pages: ipywidgets freeze without a kernel, oversized animations blow page budgets, and inconsistent styling confuses readers. This Skill encodes the fluidpy house rules so every figure, animation, and interactive plot works both in Jupyter/Colab and on the exported static web page. ## Core Features & Use Cases - Format selection guide: A decision table mapping reader needs to static matplotlib figures, matplotlib animations (video or frame player), plotly slider/animation figures, or kernel-only ipywidgets. - House style and helpers: Exact calls for fluidpy.core.style (setup_notebook, use_style, savefig), fluidpy.core.anim (animate, show_animation), and fluidpy.core.interact (slider_figure, animate_figure, live). - Budgets and lessons: Size limits (page < 15 MB, animation < 6 MB, ≤ 120 frames, dpi 80) plus a dated lessons log of past review findings. - Use Case: When writing a notebook cell showing how wave phase speed changes with water depth, use slider_figure with precomputed slider positions so the interactive plot survives publication to the static site. ## Quick Start Ask the AI to add a plotly slider figure showing how wave phase speed varies with water depth using the fluidpy interact helpers.

Frequently Asked Questions about python-viz

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an interactive plot that works on a published notebook page?

Use plotly slider_figure or animate_figure from fluidpy.core.interact, which precompute every slider position so no kernel is needed. ipywidgets only work with a live kernel, so pair any live widget with a static or slider figure for the published page.

When should I use a matplotlib animation versus a plotly slider figure?

Use a matplotlib animation with show_animation when something evolves continuously in time, like a diffusing profile or moving particles. Use a plotly slider_figure when the reader should explore how a curve changes with one parameter, since every slider position is precomputed.

Do ipywidgets work in Google Colab and exported HTML pages?

ipywidgets require a live kernel, so they work in Jupyter and Colab sessions but freeze on the exported static page. The fluidpy convention replaces them with a run-in-Colab note, so never make a live widget the only way to see an idea.

What are the size limits for notebook animations and figures?

Keep animations under 6 MB with at most 120 frames at dpi 80, the whole page under 15 MB, and the full notebook runtime under 5 minutes using the FAST flag. Plotly figures should stay within 40 slider steps, 4 traces, and 400 points.

Why does my animation look jumpy or rescale between frames?

The usual cause is autoscaling axes per frame instead of fixing axis limits upfront. Draw the first frame once, update only data in the update function, and keep fixed limits so the animation stays stable.