# Bifurcation Diagrams: Publication-Ready Figures from ODEs

> Give your agent an ODE model and a parameter range; get a journal-ready bifurcation diagram computed from the equations: branches traced through folds, stability from the Jacobian, fold, branch and Hopf points located, every branch checked by simulation.

Bifurcation Diagrams: Publication-Ready Figures from ODEs is a paid AI agent skill on Agensi by Aurora Lab, in Research & Analysis. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9 (one-time purchase)
- Creator: [Aurora Lab](https://www.agensi.io/creators/aurora-lab)
- Category: [Research & Analysis](https://www.agensi.io/skills/research-analysis)
- Version: 1.1
- Last updated: 2026-10-20
- Security: scan passed (2026-10-20); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/bifurcation-diagrams-publication-ready-figures-from-odes
- Tags: research, matplotlib, bifurcation, dynamical-systems, ode, mathematical-modelling, scientific-figures

## About this skill

### What it does
A bifurcation diagram claims two things: the branches exist where they are drawn, and they have the stability shown. This skill makes your agent compute the diagram from your model, check every branch, and draw it to publication standard. Unlike a brute-force parameter sweep, it keeps the unstable branches and pins down the points where stability changes. Give it your equations (in the message or in a Python file) and the parameter to vary, and it:

- **Traces every branch of equilibria by pseudo-arclength continuation**, so S-shaped curves pass through their folds as one branch instead of breaking off where a simple parameter sweep fails.
- **Classifies stability from the Jacobian eigenvalues at every point** (analytic Jacobian when the derivatives are easy, central differences otherwise).
- **Locates folds (SN), branch points (BP) and Hopf points (H)** by bisection on a test function: det J for real crossings, the bialternate product for Hopf, which also gives the onset frequency.
- **Compares each point with its analytic value** when one exists, and reports the error. In the demo run both points matched the exact values to about 1e-12.
- **Checks stability by simulation**: on every stable or unstable segment it perturbs a point, integrates, and confirms the trajectory returns or leaves as classified.
- **Adds limit cycles past a Hopf point** (cycle maximum and minimum from simulation, joined to the Hopf point as is standard for a supercritical Hopf, and said so in the caption), and can overlay slow-passage or hysteresis-sweep trajectories.
- **Draws one consistent encoding**: colour = branch family, solid = stable, dashed = unstable, every stability switch on its marked point, a two-part legend, exact journal column width, vector PDF plus 600-dpi PNG.
- **Writes the caption draft and spec** (fixed parameters, method, what the line styles mean, every located point) and a results JSON with each point, its state, residual, and analytic value and error when known. Then it looks at the rendered figure before handing it over.

No general plotting skill does this: the branches, their stability and the located points all come from the model, and each is checked.

### What's included
- `SKILL.md`: the workflow (model, continuation, events, simulation checks, limit cycles, drawing rules, outputs, final look)
- `scripts/bifurcation_plot.py`: continuation, stability, event location, simulation checks and limit-cycle extents in one self-contained helper, with a self-test; it writes the branch data the figure is drawn from
- A drawing block in SKILL.md (journal column widths, Okabe-Ito colours, embeddable fonts) that the diagram script you keep carries, so it redraws the figure with numpy and matplotlib alone
- `examples/`: three worked models with known answers: two folds with hysteresis, a supercritical Hopf in the Brusselator, a pitchfork in a genetic toggle switch
- `references/method.md`: the algorithm, tolerances, failure modes and fixes, and a Methods-section template

### Part of the Aurora Lab research pipeline
Works entirely on its own. With a `research/` folder it writes figures to `research/figures/` and located points to `research/results/`. Pairs well with Aurora Lab's figure skills (Paper Figures for plots from data, Figure Audit for reviewing finished figures), but needs none of them.

## Requires

- Python 3.10+
- NumPy
- Matplotlib
- Optional: SciPy

Simulations use SciPy's solve_ivp when it is installed.

## Known limitations

It continues equilibria in one parameter. Limit cycles come from forward simulation, so only attracting cycles are drawn: the unstable cycle of a subcritical Hopf, period-doubling, torus and homoclinic bifurcations, and two-parameter curves of folds or Hopf points need a dedicated continuation package such as AUTO-07p, MatCont, PyDSTool or BifurcationKit.jl (the skill says when you have reached that point). It does not switch branches automatically at a branch point: the agent seeds and traces each family separately. Models must be ODEs written as a Python function (the agent can translate equations or code you give it); delay equations, PDEs and discrete maps are not supported. With a finite-difference Jacobian, located points are accurate to about 1e-6 rather than 1e-10. Systems with neutral (non-hyperbolic) equilibria along whole branches, such as conservative models, need treatment by hand. Journal column widths are built in, but check your venue's current figure guidelines.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Bifurcation Diagrams: Publication-Ready Figures from ODEs skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does my model need to look like?

A system of ODEs with one parameter to vary. You can type the equations, point to a Python file, or paste code from another language; the agent writes it as a Python function F(x, p) and, where the derivatives are easy, an analytic Jacobian. All other parameters are held fixed and stated in the caption.

### How accurate are the located bifurcation points?

With an analytic Jacobian, typically 1e-10 or better: the bundled examples match their exact values to between 1e-17 and 2e-10, and the demo run to about 1e-12. With finite differences expect about 1e-6. When an exact value is known, the agent reports the difference, and the results JSON records it.

### Does it draw limit cycles?

Yes, for attracting cycles: their maximum and minimum come from simulation at a series of parameter values past the Hopf point. Unstable cycles (as at a subcritical Hopf) cannot be reached by simulation; the agent says so in the caption and points you to a dedicated continuation package.

### Why are the cycle curves joined to the Hopf point?

At a supercritical Hopf the cycle is born with zero amplitude at the Hopf point, so joining its maximum and minimum curves to that point is the standard way to draw it. The simulations themselves start just past the point, and the caption states that the curves are joined there.

### How does it know the stability is right?

Two ways. Stability comes from the Jacobian eigenvalues at every point, and then, on every stable or unstable segment, the agent perturbs a point and simulates to confirm the trajectory returns or leaves. A disagreement is reported and fixed, never restyled away.

### Does it replace AUTO or MatCont?

No. It covers the common case, one-parameter diagrams of equilibria with folds, branch points and Hopf onset, drawn to publication standard, using only numpy and matplotlib. For periodic-orbit continuation or two-parameter diagrams, use a dedicated package; the method notes say when.

### How is this different from Paper Figures?

Paper Figures designs figures from data you already have. Bifurcation Diagrams computes the figure from a model. Each works on its own; they pair well when a paper has both.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
