{"id":16386683,"url":"https://github.com/lofcz/mathplotter","last_synced_at":"2025-09-19T00:32:19.205Z","repository":{"id":257215144,"uuid":"857636250","full_name":"lofcz/mathplotter","owner":"lofcz","description":"Poor man's Desmos","archived":false,"fork":false,"pushed_at":"2024-09-17T03:09:40.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-13T09:23:13.723Z","etag":null,"topics":["functions","math","plotting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lofcz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T07:31:31.000Z","updated_at":"2024-09-17T07:25:02.000Z","dependencies_parsed_at":"2024-09-15T11:00:03.906Z","dependency_job_id":null,"html_url":"https://github.com/lofcz/mathplotter","commit_stats":null,"previous_names":["lofcz/mathplotter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lofcz/mathplotter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lofcz%2Fmathplotter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lofcz%2Fmathplotter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lofcz%2Fmathplotter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lofcz%2Fmathplotter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lofcz","download_url":"https://codeload.github.com/lofcz/mathplotter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lofcz%2Fmathplotter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275857828,"owners_count":25541040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functions","math","plotting"],"created_at":"2024-10-11T04:23:17.903Z","updated_at":"2025-09-19T00:32:18.858Z","avatar_url":"https://github.com/lofcz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MathPlotter\n\nPoor man's Desmos.\n\n## Features\n- Multiple plots.\n- Implicit functions.\n- Inequalities.\n- Pan \u0026 zoom.\n- Adaptive sampling.\n- Automatic parameters, value \u0026 min/max sliders.\n- Over 50 functions supported, courtesy of `math.js`.\n- Straightforward API.\n\n## Getting started\n\nMathPlotter is distributed as `umd` package. Load `jsxgraphcore.js`, `math.js` and `plotter.js`:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/jsxgraph@1.9.2/distrib/jsxgraphcore.min.js.js\"\u003e\u003c/script\u003e \n\u003cscript type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjs/13.1.1/math.min.js\"\u003e\u003c/script\u003e \n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jsxgraph/1.9.2/jsxgraph.css\" /\u003e\n\u003cscript type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/mathplotter/plotter.min.js\"\u003e\u003c/script\u003e \n```\n\nSetup HTML:\n\n```html\n\u003cdiv id=\"plotterElement\"\u003e\u003c/div\u003e\n```\n\nInstantiate `MathPlotter`:\n\n```js\nvar plotter = new MathPlotter(\"plotterElement\");\nplotter.init();\n```\n\n## Config\n\nPass config options as a second argument to the constructor of `MathPlotter`:\n\n```js\nvar plotter = new MathPlotter(\"plotterElement\", {\n  // config options\n});\n```\n\n## Instance API\n\nMethods in the following table can be called on the `plotter` instance from the examples above.\n\n| Function | Description | Call\n|--------|-------|-------|\n| `plot` | Plots one or more functions | One:`plot(\"x\")'`\u003cbr/\u003eMultiple:`plot(\"a * sin(b * x) + c;a * cos(b * x) + c;tanh(x);(x^2 + y^2 – 1)^3 = x^2 y^3\")`\u003cbr/\u003eParam hints:`plot([{fn: \"a * sin(b * x) + c\", pars: [{ name: \"a\", value: 5 }, { name: \"c\", value: 1 }]}, {fn: \"x + 2\"}])` |\n| `save` | Saves and downloads the plot in `svg` format. | `save()` |\n| `saveBitmap` | Saves and downloads the plot in `jpg`/`png` format. | `await saveBitmap(\"jpeg\")` |\n| `destroy` | Removes all event handlers, destroys elements created by MathPlotter, and frees memory. | `destroy()` |\n\n## Static API\n\nUnlike the methods above, the following methods are called on `MathPlotter` statically.\n\n| Function | Description | Call\n|--------|-------|-------|\n| `Fire` | Creates a headless instance, plots the given expressions, and destroys the instance immediately. Returns `svg` screenshot of the plot. | `Fire(\"ln(x)\")` |\n| `FireBitmap` | Creates a headless instance, plots the given expressions, and destroys the instance immediately. Returns `jpeg`/`png` screenshot of the plot. | `await FireBitmap(\"ln(x)\", \"jpeg\")` |\n\n## Build\n\nTo build `plotter.min.js` \u0026 `plotter.css`:\n\n```js\nnpm i \u0026 npm run build\n```\n\nTo start the dev server:\n\n```js\nnpm run dev\n```\n\nTo release a new version:\n\n```js\nnpm run release:minor\n```\n\n## Screenshots\n\n![image](https://github.com/user-attachments/assets/272c99d0-b149-47fd-8801-6272c239cf4b)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flofcz%2Fmathplotter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flofcz%2Fmathplotter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flofcz%2Fmathplotter/lists"}