Density Plot

Rebuilds the density plot with a density transform and filled path mark.

Density Plot
Gallery Density Pipeline pipeline

Data Sources

6

Fields

8

Scales

2

Layers

8

Glyphs

24

rect 2 / line 12 / text 9 / path 1

20406000.010.010.020.020.03density-1: density 0.01 at 18

Build Path

Gallery Density Pipeline

This example is rebuilt from gallery data source observations by recipe densityPlot: raw table rows -> TabularSource -> pipeline drafts -> analyzeAuthoringDrafts() -> materialized ChartSpec -> compileChart() -> SceneGraph -> SVG. The graph below shows the authored pipeline stage.

Pipeline recipe graph

9 pipelines
10 nodes
16 edges

Data Flow Diagram

0/265 nodes
0/452 edges
265 hidden

Select a glyph to highlight its complete source path.

Scope

Roles

source
transform
field
scale
layer
param
glyph

No matching flow nodes

Adjust search, scope, or role filters.

Available Data

6 tables
1 transforms

Imported table

source_gallery_densityplot
raw
4 columns
feeds pipeline_density_rows_transform

ChartSpec

{
  "id": "gallery.densityPlot",
  "data": [
    {
      "id": "source_gallery_densityplot",
      "rows": 24
    },
    {
      "id": "source_density",
      "rows": 48
    },
    {
      "id": "__guide.pipeline_xgrid_guide",
      "rows": 3
    },
    {
      "id": "__guide.pipeline_ygrid_guide",
      "rows": 6
    },
    {
      "id": "__guide.pipeline_xaxis_guide",
      "rows": 3
    },
    {
      "id": "__guide.pipeline_yaxis_guide",
      "rows": 6
    }
  ],
  "transforms": [
    {
      "id": "pipeline_density_rows_transform",
      "type": "density",
      "input": "source_gallery_densityplot",
      "output": "source_density",
      "options": {
        "count": 48,
        "errorMethod": "standardError",
        "field": "value",
        "fit": "contain",
        "includeMax": true,
        "layoutKind": "",
        "layoutMode": "proportionalAngle",
        "mode": "normal",
        "order": []
      }
    }
  ],
  "axes": [
    {
      "id": "pipeline_xaxis_guide",
      "scale": "pipeline_value_x_x_scale",
      "orientation": "bottom"
    },
    {
      "id": "pipeline_yaxis_guide",
      "scale": "pipeline_density_y_y_scale",
      "orientation": "left"
    }
  ],
  "grids": [
    {
      "id": "pipeline_xgrid_guide",
      "scale": "pipeline_value_x_x_scale",
      "orientation": "x"
    },
    {
      "id": "pipeline_ygrid_guide",
      "scale": "pipeline_density_y_y_scale",
      "orientation": "y"
    }
  ],
  "legends": [],
  "fields": [
    "__rowLabel",
    "id",
    "value",
    "bandwidth",
    "count",
    "density",
    "tooltip",
    "label"
  ],
  "scales": [
    {
      "id": "pipeline_value_x_x_scale",
      "type": "linear",
      "domain": {
        "source": "field",
        "data": "source_density",
        "field": "value",
        "fields": [],
        "includeZero": false,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    },
    {
      "id": "pipeline_density_y_y_scale",
      "type": "linear",
      "domain": {
        "source": "field",
        "data": "source_density",
        "field": "density",
        "fields": [],
        "includeZero": true,
        "order": "input",
        "reverse": false,
        "symmetric": false
      }
    }
  ],
  "layers": [
    {
      "id": "pipeline_xgrid_guide",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_ygrid_guide",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_xaxis_guide-tick-marks",
      "mark": "line",
      "role": "guide"
    },
    {
      "id": "pipeline_xaxis_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "pipeline_yaxis_guide-labels",
      "mark": "text",
      "role": "guide"
    },
    {
      "id": "create_chart_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_value_density_panel_layout_surface",
      "mark": "rect",
      "role": "context"
    },
    {
      "id": "pipeline_value_density_area_layer",
      "mark": "path",
      "role": "data",
      "path": {
        "directD": false,
        "areaBand": false,
        "closedToY": true,
        "curve": "linear",
        "sortBy": "value"
      }
    }
  ]
}

Resolved SceneGraph

{
  "scene": "gallery.densityPlot.scene",
  "scales": [
    {
      "id": "pipeline_value_x_x_scale",
      "type": "linear",
      "domain": [
        10,
        70
      ],
      "range": [
        70,
        830
      ],
      "ticks": [
        20,
        40,
        60
      ]
    },
    {
      "id": "pipeline_density_y_y_scale",
      "type": "linear",
      "domain": [
        0,
        0.025
      ],
      "range": [
        400,
        70
      ],
      "ticks": [
        0,
        0.005,
        0.01,
        0.015,
        0.02,
        0.025
      ]
    }
  ],
  "layers": [
    {
      "id": "create_chart_surface",
      "role": "context",
      "zIndex": -10,
      "glyphs": 1
    },
    {
      "id": "pipeline_xgrid_guide",
      "role": "guide",
      "zIndex": 0,
      "glyphs": 3
    },
    {
      "id": "pipeline_ygrid_guide",
      "role": "guide",
      "zIndex": 0,
      "glyphs": 6
    },
    {
      "id": "pipeline_value_density_panel_layout_surface",
      "role": "context",
      "zIndex": 0,
      "glyphs": 1
    },
    {
      "id": "pipeline_xaxis_guide-tick-marks",
      "role": "guide",
      "zIndex": 5,
      "glyphs": 3
    },
    {
      "id": "pipeline_xaxis_guide-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 3
    },
    {
      "id": "pipeline_yaxis_guide-labels",
      "role": "guide",
      "zIndex": 20,
      "glyphs": 6
    },
    {
      "id": "pipeline_value_density_area_layer",
      "role": "data",
      "zIndex": 20,
      "glyphs": 1
    }
  ]
}

Glyph Data Tree

8 layers

Full parameter lineage for the active compiler surface.

create_chart_surface

1

pipeline_xgrid_guide

3

pipeline_ygrid_guide

6

pipeline_value_density_panel_layout_surface

1

pipeline_xaxis_guide-tick-marks

3

pipeline_xaxis_guide-labels

3

pipeline_yaxis_guide-labels

6

pipeline_value_density_area_layer

1

Glyph Inspector

none

Select a glyph in the chart to inspect resolved params and lineage.