Data · function-plot
Function plot (curve, tangent, area)
Maths-explainer plot on dark slate: axes draw on, a curve from a safe expression string traces left to right with a glowing head, a tangent (or a secant that shrinks into the tangent) slides along it with a slope readout, then Riemann bars melt into a filled area with a running integral.
A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Function plot (curve, tangent, area) is for
Maths and physics teaching, finance curves, "explain the formula" and derivative / integral explainers.
Details
- Category
- Animated charts & data visualisation
- Length
- 8.0 s (240 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- no
- Seamless loop
- no
- Text props
titlexLabelyLabel- Colour props
backgroundinkcurveColortangentColorareaColor- Mood
- night
- Roles
- subject
Use Function plot (curve, tangent, area) in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add function-plot --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render function-plot --props '{"title":"f(x) = sin x + x/3","xLabel":"x","yLabel":"f(x)","background":"#1C1C1C","ink":"#F2F2F2","curveColor":"#58C4DD","tangentColor":"#FFFF00","areaColor":"#83C167"}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export function-plot --as mp4 --props '{"title":"f(x) = sin x + x/3","xLabel":"x","yLabel":"f(x)","background":"#1C1C1C","ink":"#F2F2F2","curveColor":"#58C4DD","tangentColor":"#FFFF00","areaColor":"#83C167"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="function-plot"
props={{
title: 'f(x) = sin x + x/3',
xLabel: 'x',
yLabel: 'f(x)',
background: '#1C1C1C',
ink: '#F2F2F2',
curveColor: '#58C4DD',
tangentColor: '#FFFF00',
areaColor: '#83C167',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="function-plot"
props='{"title":"f(x) = sin x + x/3","xLabel":"x","yLabel":"f(x)","background":"#1C1C1C","ink":"#F2F2F2","curveColor":"#58C4DD","tangentColor":"#FFFF00","areaColor":"#83C167"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "function-plot",
"props": {
"title": "f(x) = sin x + x/3",
"xLabel": "x",
"yLabel": "f(x)",
"background": "#1C1C1C",
"ink": "#F2F2F2",
"curveColor": "#58C4DD",
"tangentColor": "#FFFF00",
"areaColor": "#83C167"
}
}
]
}Function plot (curve, tangent, area) props
18 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
fn | "sin(x) + x/3" | expression in x: + - * / ^, sin cos tan exp ln sqrt abs, pi, e, implicit "2x" |
points | [] | optional [[x,y],...] data instead of fn (linearly interpolated) |
domain | [-6,6] | x range [min, max] |
range | null | y range [min, max]; null = auto from the curve |
tangentMode | "secant" | 'tangent' | 'secant' (shrinking h) | 'none' |
tangentFrom | -4.6 | x where the tangent starts sliding |
tangentTo | 3.2 | x where it stops |
fillArea | [-1,4] | [a, b] integral to fill, or null for none |
riemann | 10 | number of Riemann bars that melt into the area (0 = none) |
title | "f(x) = sin x + x/3" | formula caption (top left) |
xLabel | "x" | x axis label |
yLabel | "f(x)" | y axis label |
showGrid | true | faint grid |
background | "#1C1C1C" | background colour |
ink | "#F2F2F2" | axes / text colour |
curveColor | "#58C4DD" | curve colour |
tangentColor | "#FFFF00" | tangent / readout colour |
areaColor | "#83C167" | area colour |
Related motions

Math equation solve
Maths tutorials, homework-help shorts, algebra explainers, STEM course trailers and "solve it with me" reels — pass any list of equation…
math-equation-solve
Pythagoras proof by rearrangement
Maths lessons, geometry explainers, "the proof in 7 seconds" shorts, and any "same pieces, new arrangement" idea.
pythagoras-rearrange
Atom electron cloud builder
Chemistry and physics explainers, "how elements are built" lessons, periodic-table intros, science channel hero shots.
atom-electron-cloud
Emission spectrum lines
Physics and chemistry explainers on atomic spectra, "how we know what stars are made of", element fingerprints, astronomy intros.
emission-spectrum-lines
Bubble scatter grow
Three-variable comparisons: markets by size, growth and margin, countries, products, campaigns, startups. Pass points as [{label, x, y,…
bubble-scatter-grow
Cause and effect chain
Domino-effect explainers, "how X leads to Y" chains, root-cause stories, economics / science / news cause chains — pass `steps` (2-7 short…
cause-effect-chain
Notes & credits
Technique sources:
- prompt-corpus research: function-plot (16 cases, ideas only; original implementation)