viz.scatter
Scatter plot of two numeric columns, with an optional trend line.
- Kind:
standard - Network: no
| Name | Type | Required | Default | Description |
|---|
table | file (Parquet) | yes | | Table to chart (Parquet or CSV). |
x | string | yes | | Numeric column for x. |
y | string | yes | | Numeric column for y. |
color | string | no | blank | Column to colour points by. |
size | string | no | blank | Numeric column to size points by. |
trend | string | no | none | Trend line to fit. One of none, linear, loess. |
title | string | no | blank | Chart title. ${item.key} labels each chart inside a map. |
width | number | no | 600 | Width in pixels. |
height | number | no | 400 | Height in pixels. |
format | string | no | png | Image format. html is a static, self-contained page. One of png, svg, html. |
Outputs🔗
| Name | Type | Description |
|---|
chart | file (PNG) | The rendered chart. |
spec | json (Vega-Lite) | The Vega-Lite spec the block built; edit it and render with viz.vegalite. |
Example🔗
- id: "@scatter"
name: viz.scatter
inputs: [{block: "@plots", output: result, as: table}]
args:
x: height
y: biomass
trend: linear
title: ''
format: png