README file from
GithubExcalidraw Math Plotter
Plot mathematical function graphs directly onto Excalidraw canvases in Obsidian.
Features
- Plot mathematical functions: Enter any mathematical expression using
xas the variable - Real-time preview: Adjust curve optimization with a live preview slider
- Customizable appearance: Configure stroke color, width, and graph styling
- Axis options: Show/hide tick marks, grid lines, arrows, and numeric labels
- Quick presets: One-click access to common functions (sine, cosine, parabola, etc.)
- Discontinuity handling: Automatically handles functions with discontinuities (tan, 1/x, etc.)
- Smart curve optimization: Uses Ramer-Douglas-Peucker algorithm for efficient point reduction
Requirements
- Excalidraw plugin must be installed and enabled
Usage
- Open an Excalidraw drawing
- Run the command Excalidraw Math Plotter: Insert function graph (via Command Palette or hotkey)
- Enter your mathematical equation (e.g.,
sin(x),x^2,log(x)) - Configure the X range and appearance options
- Use the optimization slider to adjust curve quality
- Click Apply to insert the graph
Supported Functions
The plugin uses mathjs for expression parsing. Examples:
- Basic:
x,x^2,x^3,sqrt(x),abs(x) - Trigonometric:
sin(x),cos(x),tan(x) - Logarithmic/Exponential:
log(x),exp(x),log10(x) - Combinations:
sin(x) * x,x^2 + 2*x - 1,sin(x) + cos(2*x)
Installation
From Community Plugins
- Open Settings → Community plugins
- Select Browse and search for "Excalidraw Math Plotter"
- Select Install, then Enable
Manual Installation
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create a folder
VaultFolder/.obsidian/plugins/obsidian-excalidraw-plotter/ - Copy the downloaded files into this folder
- Reload Obsidian and enable the plugin in Settings → Community plugins
License
MIT License - see LICENSE for details