ComfyUI Node
CV Draw Plot Frame
Puts a grid, ticks labelled in WORLD units and a scale bar under a 2D plot - the axes that turn a drawn path or point cloud into a readable figure. Without them a trajectory is a squiggle with no size: you cannot tell a 3 metre wobble from a 300 metre one. Feed it the SAME world points and margin you gave 'CV Fit Points To Box' (via 'extent_from', or as explicit min/max) and it reproduces that node's mapping exactly, so a tick at 50 m lands where the point at 50 m lands. Draw this FIRST, then the data on top. Nothing here reads the data itself, so it also works as an empty graticule.
CV Draw Plot Frame
- source
- extent_from
- image
◄x_min0.00►
◄x_max100.00►
◄y_min0.00►
◄y_max100.00►
◄margin20►
◄grid_x6►
◄grid_y6►
◄y_axisy down (pixel rows)►
◄unitsm►
◄x_labelx►
◄y_labelz►
◄scale_barbottom-left►
◄color(200, 200, 200)►
◄grid_color(70, 70, 70)►
Categoryimage/CV/points
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| source | COMFY_MATCHTYPE_V3 | Canvas to draw on (a copy is made) - e.g. 'OpenCV Constant Like'. Its size sets the plot box. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. | |
| x_min | FLOAT | 0.00-1000000000–1000000000 | World range, used only when 'extent_from' is empty. |
| x_max | FLOAT | 100.00-1000000000–1000000000 | — |
| y_min | FLOAT | 0.00-1000000000–1000000000 | — |
| y_max | FLOAT | 100.00-1000000000–1000000000 | — |
| margin | INT | 200–4096 | Must MATCH the margin given to 'CV Fit Points To Box', or the grid and the data disagree. |
| grid_x | INT | 60–64 | Roughly how many vertical grid lines to aim for; the actual step is rounded to a 1 / 2 / 5 x 10^k value so the labels stay round numbers. 0 = no grid. |
| grid_y | INT | 60–64 | Same for horizontal grid lines. |
| y_axis | COMBO | y down (pixel rows) | Which way the second coordinate grows. Points that came through 'Fit Points To Box' are already in PIXEL rows (y grows downward) - that is the default. Choose 'y up (world)' only if you flipped them yourself. |
| units | STRING | m | Unit suffix on the tick labels and the scale bar ('m', 'px', 'mm'...). Empty for bare numbers. |
| x_label | STRING | x | Axis name drawn at the bottom right. Empty = none. |
| y_label | STRING | z | Axis name drawn at the top left. Empty = none. For a top-down ('XZ') view of a trajectory this is z. |
| scale_bar | COMBO | bottom-left | A labelled bar of known world length. It is the one annotation that still says how big the picture is after someone crops or rescales the image. |
| color | STRING | (200, 200, 200) | Colour of the ticks, labels, border and scale bar. |
| grid_color | STRING | (70, 70, 70) | Colour of the grid lines - keep it well below the data's contrast so the grid stays behind it. |
| extent_fromopt | NPARRAY | World points, Nx2, whose bounding box defines the plotted range - pass the same array you gave 'Fit Points To Box' (both tracks concatenated, if you are overlaying two). When absent the explicit min/max below are used. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | COMFY_MATCHTYPE_V3 | Same format as the image input. |