numbl 0.4.0 → 0.4.1

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.
@@ -83,8 +83,17 @@ export interface ContourTrace {
83
83
  z: number[];
84
84
  rows: number;
85
85
  cols: number;
86
- /** Number of contour levels */
86
+ /** Number of contour levels (used only when `levels` is not given) */
87
87
  nLevels: number;
88
+ /** Explicit contour levels (from `contour(...,V)` or `LevelList`). When
89
+ * absent, levels are chosen automatically from the data range. */
90
+ levels?: number[];
91
+ /** Line width from a `'LineWidth'` name-value pair. */
92
+ lineWidth?: number;
93
+ /** Line style from a `'LineStyle'` name-value pair (e.g. '-', '--'). */
94
+ lineStyle?: string;
95
+ /** Line color: an RGB triple, or a colormap keyword like 'flat'. */
96
+ lineColor?: number[] | string;
88
97
  /** Whether this is a filled contour (contourf) */
89
98
  filled: boolean;
90
99
  }
@@ -179,6 +188,27 @@ export interface QuiverTrace {
179
188
  /** Whether the marker should be filled */
180
189
  markerFilled?: boolean;
181
190
  }
191
+ export interface Quiver3Trace {
192
+ /** Tail coordinates (flat arrays) */
193
+ x: number[];
194
+ y: number[];
195
+ z: number[];
196
+ /** Directional components, already scaled to data units */
197
+ u: number[];
198
+ v: number[];
199
+ w: number[];
200
+ /** Whether to draw arrowheads */
201
+ showArrowHead: boolean;
202
+ /** Arrow color as RGB triple [0–1] */
203
+ color?: [number, number, number];
204
+ lineStyle?: string;
205
+ lineWidth?: number;
206
+ marker?: string;
207
+ markerFilled?: boolean;
208
+ /** Whether auto-scaling was applied (for handle queries) */
209
+ autoScale?: boolean;
210
+ autoScaleFactor?: number;
211
+ }
182
212
  export interface HeatmapTrace {
183
213
  /** Cell values: flat array (column-major), rows × cols */
184
214
  data: number[];
@@ -201,6 +231,9 @@ export type PlotInstruction = {
201
231
  } | {
202
232
  type: "surf";
203
233
  trace: SurfTrace;
234
+ } | {
235
+ type: "surface";
236
+ trace: SurfTrace;
204
237
  } | {
205
238
  type: "imagesc";
206
239
  trace: ImagescTrace;
@@ -244,6 +277,9 @@ export type PlotInstruction = {
244
277
  } | {
245
278
  type: "quiver";
246
279
  traces: QuiverTrace[];
280
+ } | {
281
+ type: "quiver3";
282
+ trace: Quiver3Trace;
247
283
  } | {
248
284
  type: "set_hold";
249
285
  value: boolean;
@@ -268,6 +304,9 @@ export type PlotInstruction = {
268
304
  type: "close_all";
269
305
  } | {
270
306
  type: "clf";
307
+ } | {
308
+ type: "cla";
309
+ reset: boolean;
271
310
  } | {
272
311
  type: "set_subplot";
273
312
  rows: number;