Skip to content

Chart types

pymyIO renders 40 chart types — the same set as R-myIO. Every type below is a valid value for MyIO.add_layer(type=...).

Basic

Type Required mapping Notes
line x_var, y_var Add group to stack per-series lines.
point x_var, y_var Pair with transform="lm" for a fitted line.
bar x_var, y_var Call .define_categorical_axis(x_axis=True) for categorical x.
groupedBar x_var, y_var, group One bar per group, dodged.
area x_var + (y_var or low_y+high_y) Area to baseline (y_var) or a shaded band between low_y/high_y.
histogram value Bin counts.

Statistical

Type Required mapping Notes
regression x_var, y_var Composite: points + fit line. options={"method": "lm" \| "polynomial"}.
rangeBar x_var, low_y, high_y transform="mean_ci" also accepted with {x_var, y_var} — the transform synthesizes the low_y/high_y band.
qq y_var Composite: reference line + points (envelope deferred). Pass mapping["group"] for per-group Q-Q.
boxplot x_var, y_var Composite: IQR rangeBar + whisker points + median + Tukey outliers.
violin x_var, y_var Composite: per-group KDE area + optional box / median / raw points.
ridgeline x_var, y_var, group Composite: stacked density areas with overlap factor.
comparison x_var, y_var :material-alert: uses pairwise_test — see Roadmap.

Uncertainty

Type Required mapping Notes
quantile_dots x_var, y_var Quantile dotplot of a predictive distribution. transform="quantile_dots" with options={"source": ...} — one of bootstrap, posterior, ensemble, empirical; n sets the dot count.
fan x_var, y_var, low_y, high_y Composite forecast fan: nested prediction-interval bands. Requires ≥ min_obs (default 10) observations per x_var group.

Specialized

Type Required mapping Notes
donut x_var, y_var Annular pie.
gauge value Single-value dial.
treemap level_1, level_2 Hierarchical rectangles.
heatmap x_var, y_var, value Color-encoded matrix.
hexbin x_var, y_var, radius 2D density binning.
calendarHeatmap date, value GitHub-style contribution calendar.

Financial

Type Required mapping Notes
candlestick x_var, open, high, low, close OHLC bars.
waterfall x_var, y_var Bridge chart; total column marks terminal bars.

Relational

Type Required mapping Notes
sankey source, target, value Flow diagram.
parallel dimensions Parallel-coordinates plot.

"New" family

Type Required mapping Notes
lollipop x_var, y_var Bar+dot hybrid.
dumbbell x_var, low_y, high_y Two-point range per category.
waffle category, value 10×10 square grid by share.
beeswarm x_var, y_var Jittered points with force-directed nudging.
bump x_var, y_var, group Rank transitions over time.
radar axis, value Polar plot across named axes.
funnel stage, value Sales / pipeline funnel.

Sports

Type Required mapping Notes
field x_var, y_var, time, entity Tracking playback on a pitch; optional team, label, kind. options={"events": ..., "overlays": {"shape": True, "separation": True}, "excludeEntities": [...], "minPlayers": 2, "metricWindow": (t0, t1)}. Stands alone: no other layer types on the same chart.

Maps and point clouds

Type Required mapping Notes
raster x_var, y_var, value A regular grid (e.g. a DEM) drawn as one image on continuous axes, so points and lines can sit on top. x_var/y_var are cell centers; an optional shade column (0-1) darkens cells, e.g. a hillshade. options={"cellWidth": ..., "cellHeight": ..., "palette": "viridis" \| "cividis" \| "greys"}; cell size defaults to the data's spacing. Hover a cell for its value.
image x_var, y_var A picture stretched over its rows' x/y extent and drawn under every other layer, e.g. an orthophoto. options={"src": "data:image/png;base64,..."} or a web URL.
pointcloud x_var, y_var, z_var Large point clouds drawn with WebGL in their own panel: drag to orbit, shift-drag to pan, scroll or pinch to zoom, double-click to reset, or switch to a top-down 2D plan. Optional red, green, blue (0-255), class and sigma; chips in the view color by RGB, class, height or sigma. The points are sent packed as binary, so hundreds of thousands draw smoothly. Map source too ("camera" or 1 is camera, anything else LiDAR) for the LiDAR / Camera chips. Options: color, mode ("3d" or "plan"), pointSize, classColors, classNames, ortho ({"src", "extent", "z"}), track (list of [x, y, z]), trackBand (list of [x, y, z, u], u the relative uncertainty 0-1), terrain (a DEM grid the 3D view drapes the orthophoto on; build it with pymyio.chart.pointcloud_terrain(df)), mesh (build it with pymyio.chart.pointcloud_mesh(vertices, faces); turns on the Points / Mesh switch), surface ("points" or "mesh"), profile ([[x0, y0], [x1, y1]]), selectable ({"key", "ids", "x", "y"}: the 2D Select tool sends the picked ids to linked charts), caption ({"shape", "shapeNote", "map", "mapNote", "cameraNote"}), slider (default true: with a track of two or more points, a slider along the walk focuses the view on that point, cutting away what is in front of it in 3D; false hides it). 3D draws on a dark background; 2D uses the page theme's --chart-bg. Stands alone. Not included in PNG/SVG export.

Pair raster and image with .set_equal_aspect() so a meter is the same length on screen on both axes:

corners = [{"x": 0, "y": 0}, {"x": 20, "y": 15}]
(MyIO()
 .add_layer(type="image", label="Orthophoto", data=corners,
            mapping={"x_var": "x", "y_var": "y"},
            options={"src": "https://example.org/ortho.png"})
 .set_equal_aspect())

Line layers also take options={"curveType": "linear", "showPoints": False} (straight segments, no vertex markers), and point layers take options={"pointRadius": 2}. The myDAR walks page builds all of these from a real walk.

Deferred / not-yet-rendering in 0.1.x

See Roadmap for landing targets.

Type Reason
comparison Needs pairwise_test transform port.
survfit Needs Kaplan-Meier composite expansion (transform exists, expansion not wired).
histogram_fit Needs composite_histogram_fit port (transform exists, expansion not wired).

Composite types

regression, boxplot, violin, ridgeline, comparison, qq, survfit, and histogram_fit expand to multiple primitive layers under the hood (e.g. regression = point + line[lm]). You do not need to stack them manually — MyIO.add_layer(type="regression", …) handles it.

Layer compatibility

myIO groups layer types by axis style. Compatible groups can coexist on the same chart; incompatible ones raise at add_layer() time:

  • axes-continuous: line, point, area, candlestick, rangeBar, text, regression, bracket, comparison, qq, bump, survfit, raster, image
  • axes-categorical: bar, groupedBar, waterfall, boxplot, violin, lollipop, dumbbell, beeswarm
  • axes-binned: histogram, ridgeline, histogram_fit
  • axes-matrix: heatmap, calendarHeatmap
  • axes-hex: hexbin
  • standalone-flow: sankey, treemap, waffle, funnel, parallel
  • standalone-radial: donut, gauge, radar
  • standalone-pointcloud: pointcloud (nothing else on the same chart)