- Home
- Skills
- Research & Analysis
- Bifurcation Diagrams: Publication-Ready Figures from ODEs
More screenshots
Works with the AI Agents you already use
Bifurcation Diagrams: Publication-Ready Figures from ODEs
This skill makes your agent compute the diagram from your model, check every branch, and draw it to publication standard.
$9
Bifurcation Diagrams: Publication-Ready Figures from ODEs
Example session with this skill installed
My predator-prey model is in model.py. I need a publication-ready bifurcation diagram for a paper: carrying capacity K from 0.2 to 4 on the x axis, predator density on the y axis, single journal column, with the limit cycle shown where there is one. Keep the other parameters as in PARAMS. Mark the bifurcation points and tell me exactly where they are.
- Read your context and instructions
- Compiled the bifurcation diagrams
I've made the figure. With PARAMS (r = 1, a = 1, h = 1, e = 0.5, m = 0.2) there are two bifurcation points in K ∈ [0.2, 4], and the numerical values match the closed-form ones to about 1e-12.
| Point | K (numerical) | Exact value | Predator density there | What happens |
|---|---|---|---|---|
| BP (transcritical) | 0.666666666666 | 2/3, i.e. K = N* = m / (a(e − mh)) | P = 0 | The prey-only state (K, 0) loses stability and the coexistence equilibrium enters P > 0. Below this the predator can't persist. |
| H (supercritical Hopf) | 2.333333333333 | 7/3, i.e. K = 2N* + 1/(ah) | P* = 25/21 ≈ 1.1905 | The coexistence equilibrium loses stability and a stable limit cycle appears. Its frequency at onset is ω = 0.29277 (period ≈ 21.46). This is the paradox of enrichment. |
Checks:
- Every stable or unstable segment was confirmed by perturbing a point on it and simulating.
- The Hopf is supercritical. Just below K = 7/3, trajectories settle to the equilibrium with no cycle. Just above it, the cycle amplitude grows like √(K − K_H).
What the figure shows:
- The width is 90 mm, a standard single column, with vector PDF output.
- Colour marks each branch family: blue is the prey-only state, orange the coexistence equilibrium, green the cycle max and min. Line style marks stability: solid is stable, dashed is unstable.
- The coexistence branch is cut at P = 0. Mathematically it continues to negative P for K < 2/3, but that part has no biological meaning.
- The cycle curves are joined to H, which is the standard way to draw a supercritical Hopf.
Files: bifurcation_K.py (reproduces everything), research/figures/rosenzweig_macarthur_K.pdf / .png, a caption draft in research/figures/rosenzweig_macarthur_K.md, and the located points with exact values and errors in research/results/rosenzweig_macarthur_K-bifurcations.json.
Connects securely to your tools. The creator never sees your data.
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, limit-cycle extents, drawing helpers and output writers, with a self-testscripts/plot_style.py: journal column widths, Okabe-Ito colours, embeddable fontsexamples/: three worked models with known answers: two folds with hysteresis, a supercritical Hopf in the Brusselator, a pitchfork in a genetic toggle switchreferences/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.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean 1 day ago
- Passed all security checks, Safe to install
Requires