Math Plotter

approved

by Sharbel Marshi

Create math graphs from a GUI. Insert plots via forms without writing plot code. - This plugin has not been manually reviewed by Obsidian staff.

237 downloadsUpdated 1mo agoMIT

Math Plotter

Insert mathematical graphs into Obsidian notes through a form. You type normal math (sin^2(x), x^2+y^2), not TikZ, PGFPlots, or Octave syntax. The plugin stores a small JSON block in your note and renders it as SVG in Reading View.


Sample output

These SVGs were exported from Math Plotter:

2D sine waveFunction with pointFourier-style wave
2D function2D function + labeled pointOscillating 2D plot
3D curved surfacePDE heat surfacePDE colored surface
3D surface (heat colormap)Heat-equation style surfacePDE solution surface
PDE surface variantPDE wireframe
Another 3D PDE plotWireframe 3D surface

Graphs render with a transparent background so they sit cleanly on your note.


What you can plot

TypeWhat you enter
2D functiony = f(x) — e.g. sin^2(x)
3D surfacez = f(x, y) — e.g. x^2+y^2
ODEAn explicit solution you already have — e.g. exp(-2*x) for y' = -2y
PDEAn explicit solution surface — e.g. exp(-2*t)*sin(x)*sin(y) with parameter t
Parametric 2D / 3Dx(t), y(t), optional z(t) — full modal only
Data(x, y) pairs
PointsLabeled points on top of any plot (Points tab in the modal)

Math Plotter does not symbolically solve ODEs or PDEs. for advanced ODEs or PDEs solving enable and download octave cli through the settings tab.


How to insert a graph

Ribbon - click the line-chart icon (Insert Function Plot).

Command palette - run Insert Function Plot.

Empty code block - type a fenced block with nothing inside:

An inline builder appears. Use More Options to open the full modal with tabs for Equation, Ranges, Style, Size, and Points.


Rendered graph toolbar

Once a graph is drawn, hover the toolbar:

Edit · Refresh · − · 100% · + · Export · Export PNG

  • Edit opens the full graph builder (including the Size tab).
  • Refresh redraws the fast SVG preview.
  • − / % / + change on-screen zoom only (no recompile).
  • Export downloads SVG; Export PNG downloads a PNG.

Math Plotter does not read or write the system clipboard.


Expression syntax

Write calculator-style math in function fields:

x^2 + y^2
sin^2(x)+cos^2(y)
exp(-2*t)*sin(x)*sin(y)
sqrt(x^2+y^2)
ln(x)          (log(x) works too)
pi / π
2sin(x)

The plugin saves your expression as-is in the function field. Compilation to PGFPlots or Octave happens at render time only.


Style and sizing

2D / ODE — theme-aware line color by default (auto), optional grid, custom line width.

3D / PDE 3D — colored heat mesh by default; switch to wireframe or solid in the Style tab.

LaTeX size — preset or custom width/height; affects export quality and axis labels.

Display scale — 0.5×–2.5× zoom in Obsidian only; adjustable from the toolbar without recompiling.


After installing: enable Settings → Community plugins → Math Plotter, then reload Obsidian.

Settings

Settings → Math Plotter

SettingNotes
Output formatSVG in Reading View; PNG available on export
LuaLaTeX fallbackOff by default; retries failed TikZJax renders if TeX is installed
Octave engineOff by default; external numerical sampler for advanced use
Prefer Octave for 3D / ODE·PDE numericOnly relevant when Octave is enabled
Debug modeShows generated TikZ in error details

Per-graph size is set in the builder (Size tab) or the inline builder preset — not in plugin settings.


Rendering (under the hood)

Normal graphs use a built-in JavaScript sampler and draw SVG directly. That is the default path — fast, no WASM compile on every edit.

TikZJax (bundled WebAssembly) compiles generated PGFPlots when needed — for example when fast preview is unavailable for a graph type, an error panel offers High quality render.

Octave (optional) samples numerically via octave-cli and feeds CSV data to PGFPlots. Not required for everyday plotting.

LuaLaTeX (optional) is a fallback when TikZJax cannot compile a particular plot.


Requirements

  • Obsidian Desktop (required)
  • Node.js (build from source only)

Optional: GNU Octave CLI (octave-cli), LuaLaTeX + Poppler for fallbacks.


Troubleshooting

Graph too small — open Edit → Size, pick Large or Full width, or use the toolbar zoom.

Surface clipped — widen the z range. For z = x^2 on a wide x range, a narrow z range will cut most of the surface off.

TikZJax failed — enable LuaLaTeX fallback in Advanced settings if you have MacTeX or TeX Live.

Octave issues — set the path to octave-cli (e.g. /opt/homebrew/bin/octave-cli on Apple Silicon), not the GUI app. Use Test Octave in settings.

Invalid block — use Edit Graph or Reset Block on the error panel.


Release process: RELEASING.md


License

MIT — Copyright © Sharbel Marshi

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.