@danielsimonjr/mathts-plot 0.4.13 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -129,11 +129,23 @@ Per-type mark functions, each `(x, y, opts?) => string` unless noted:
|
|
|
129
129
|
- **`viridis(t)`** — the perceptually-uniform colormap used by `heatmap`/`contour`/`surface`,
|
|
130
130
|
exposed for reuse.
|
|
131
131
|
|
|
132
|
+
### `./render` — PNG/PDF from SVG (Node only)
|
|
133
|
+
|
|
134
|
+
The main `.` entry returns SVG/TikZ strings only. For file output, import the isolated
|
|
135
|
+
Node subpath (shells out to `rsvg-convert` / `resvg` or `pdflatex` / `tectonic` on PATH):
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
import { renderToFile, latexToPdf } from '@danielsimonjr/mathts-plot/render';
|
|
139
|
+
|
|
140
|
+
await renderToFile(svgString, 'plot.png', { density: 144 });
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
See `docs/api/plot.md` for `RenderOptions`, `PlotRenderError`, and `hasTool`.
|
|
144
|
+
|
|
132
145
|
Notes:
|
|
133
146
|
|
|
134
147
|
- Pure ESM, `strict` TypeScript, no runtime dependencies beyond the MathTS bedrock
|
|
135
|
-
(`core`/`functions`/`expression`).
|
|
136
|
-
- SVG-only in v1 — no PNG/canvas rendering.
|
|
148
|
+
(`core`/`functions`/`expression`) on the browser-safe `.` entry.
|
|
137
149
|
- `workbook` renders its charts through this package (its former private `svg.ts` plotter was
|
|
138
150
|
removed).
|
|
139
151
|
|
package/dist/index.js
CHANGED
|
@@ -1339,6 +1339,6 @@ function curve3d(x, y, z, opts = {}) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
//#endregion
|
|
1341
1341
|
//#region src/index.ts
|
|
1342
|
-
const VERSION = "0.4.
|
|
1342
|
+
const VERSION = "0.4.15";
|
|
1343
1343
|
//#endregion
|
|
1344
1344
|
export { VERSION, area, bar, contour, curve3d, errorbar, heatmap, histogram, line, overlay, plot, quiver, scatter, scatter3d, step, surface, toTikZ, viridis };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/mathts-plot",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.15",
|
|
4
4
|
"description": "Headless SVG 2D/3D plotting for MathTS — dependency-light, expression-aware, built on core/functions/expression",
|
|
5
5
|
"author": "Daniel Simon Jr.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"clean": "rm -rf dist"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@danielsimonjr/mathts-core": "^0.
|
|
39
|
-
"@danielsimonjr/mathts-functions": "^0.
|
|
40
|
-
"@danielsimonjr/mathts-expression": "^0.
|
|
38
|
+
"@danielsimonjr/mathts-core": "^0.21.0",
|
|
39
|
+
"@danielsimonjr/mathts-functions": "^0.70.1",
|
|
40
|
+
"@danielsimonjr/mathts-expression": "^0.11.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^26.4.0",
|