Seaborn Plot
Category: Mega-Polis → Visualisation → Visualisation Data Tools
Node ID:SvMegapolisSeabornPlot
Tooltip: Seaborn Plot
Dependencies:seaborn,matplotlib,pandas
Functionality
Creates a Seaborn-based statistical plot from an input Pandas DataFrame.
The node:
- Receives a DataFrame and selected feature names.
- Generates a Seaborn plot (e.g., scatter, line, histogram, boxplot).
- Displays the plot using Matplotlib.
This node is intended for quick exploratory statistical visualisation inside Mega-Polis workflows.
Inputs
| Socket | Type | Description |
|---|---|---|
| Dataframe | SvStringsSocket | Input Pandas DataFrame. Must be linked. |
| X | SvStringsSocket | Column name used for X axis. |
| Y | SvStringsSocket | Column name used for Y axis (if required by plot type). |
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Plot Type (plottype) |
Enum | scatter |
Selects which Seaborn plot function is used. |
| Hue | String | None | Optional grouping column for colour separation. |
| Style | String | None | Optional grouping column for marker style. |
| Height | Float | 6 | Figure height (inches). |
| Run | Bool | False | When enabled, generates the plot. |
Available plot types
scatterlinehistboxviolinbar
(Exact list depends on implementation in the node source.)
Outputs
This node has no output sockets.
It generates and displays a Seaborn/Matplotlib plot when Run=True.
Example
Scatter plot of height vs area
- Load a dataset (e.g., via Read CSV).
- Connect:
- Dataframe → Dataframe
- X →
"height" - Y →
"area"
- Set:
- Plot Type →
scatter - Run → True
- Plot Type →
- The node will display a Seaborn scatter plot.
Grouped boxplot
- X →
"landuse" - Y →
"height" - Plot Type →
box - Optional: Hue →
"zone_type" - Run → True

Notes
- The node only displays plots when Run is enabled.
- X and Y features must exist in the DataFrame.
- Some plot types require both X and Y; others (e.g., histogram) may require only one.
- Large datasets may slow down rendering.
- Output appears in the Matplotlib display context (not as a Sverchok output object). ```