Graph builder: explore data by dragging variables into a graph

Updated

A graph builder is an interactive way to make graphs: instead of choosing a graph type first and filling in a dialog, you assign variables to roles such as X, Y, color and panel, and the graph redraws at once. You can switch the same assignment between a boxplot, a dotplot, a scatterplot or a bar chart, split it by a factor, and add a table of summary statistics. It is built for exploration, when you do not yet know which picture will tell the story.

When to use it

  • You have a new dataset with several columns and want to look at it from many angles quickly.
  • You suspect that one or two factors (line, shift, supplier, cavity) explain much of the variation, and want to see which.
  • You need to try a few graph types on the same data before choosing one for a report.
  • You want summary statistics by group, such as means by line and shift, next to the graph that shows them.

Once you know which graph you need, a dedicated command such as a boxplot or scatterplot gives the same result with all its options.

How it works

A graph builder separates what you plot from how you draw it:

  1. Roles. Each variable goes to a role: Y (the response), X (a factor or a second measurement), group or color (a factor drawn with different colors or symbols), and panel (a factor that splits the graph into side-by-side panels on shared axes).
  2. Graph type. The same roles can be drawn as different graphs. A numeric Y with a categorical X suits boxplots, individual values or interval plots; two numeric variables suit a scatterplot; Y alone suits a histogram or dotplot.
  3. Summaries. Counts, means, medians or standard deviations can be computed for each combination of factors and shown as a table, often called tabulated statistics.
  4. Live update. Every change of role, type or filter redraws the graph immediately, so you compare views in seconds.

The roles mirror how variation is usually explored in quality work: start with the response alone, then split it by the factors one at a time, as a multi-vari chart does.

Example

A coating plant runs two lines, A and B, on three shifts. An engineer pulls 4 panels per line and shift (24 in all) and records the cured coating thickness (µm) and the oven temperature (°C) at the time. Overall, thickness averages 52.40 µm with a standard deviation of 1.90 µm and runs from 49.8 to 57.1 µm. The target is 52 ± 3 µm, and three panels exceed 55 µm.

Step 1: Y = thickness, X = line, drawn as a boxplot. Line B is thicker and more variable: mean 53.73 µm and standard deviation 1.78 µm, against 51.08 µm and 0.77 µm for line A.

Coating thickness by line50525456Thickness (µm)Line ALine B
Coating thickness by line

Step 2: add shift as a second factor, with tabulated means.

LineShift 1Shift 2Shift 3All shifts
A50.9551.4550.8351.08
B52.7052.8555.6353.73

Line A is flat across shifts. On line B, shift 3 stands out at 55.63 µm, about 2.8 µm above B's other shifts, and its four panels (54.5 to 57.1 µm) include all three above 55 µm. With 4 panels per cell, the engineer switches the view to individual values rather than boxes to see each panel.

Step 3: Y = thickness, X = oven temperature, color = line, as a scatterplot.

Coating thickness versus oven temperature50525456Thickness (µm)182184186188Oven temperature (°C)
Coating thickness versus oven temperature

Line B's oven runs hotter, 186.3 °C on average against 182.0 °C, and thicker coatings go with higher temperatures. Within each line, thickness rises by about 0.5 µm per °C (0.46 on A, 0.53 on B). The least-squares line through all 24 points is steeper, 0.59 µm per °C, because it also absorbs the difference between the lines. So temperature accounts for much of B's extra thickness. It does not explain shift 3: B's shift 3 ran at 186.8 °C on average, about the same as shift 2 (186.6 °C), yet came out almost 2.8 µm thicker.

Three views, a few minutes, and two concrete leads: bring line B's oven down toward line A's setting, and find out what shift 3 does differently on line B, such as the spray settings or the paint mixing.

How to read the results

  • Start with Y alone, then add one factor at a time and watch how much of the spread each one explains.
  • Compare within-group and between-group variation. A factor matters when its groups differ by more than the scatter inside them.
  • Check the counts in the tabulated statistics; a striking mean from 2 values is weak evidence.
  • Look for factors that travel together, like line and oven temperature here. A graph cannot separate their effects if they always move together.

Common mistakes

  • Fishing. Try enough combinations and some pattern will appear by chance. Treat what you find as a lead and confirm it with new data or a test.
  • Too many roles at once. Color, symbol, panel and size on one graph overload it. Two factors at a time is usually the limit.
  • Keeping a graph type that does not fit. Boxes for 4 values, bars for means and 3D effects hide the data. Switch to individual values or intervals.
  • Forgetting the axis ranges across panels. Panels should share scales, or the comparison misleads.

Frequently asked questions

What is a graph builder?

An interactive tool where you assign variables to roles (X, Y, color, panel) and pick a graph type, with the graph updating as you go. It speeds up exploring data before you settle on a final graph.

What are tabulated statistics?

A table of summaries (counts, means, standard deviations and so on) for each combination of one or more factors, such as mean thickness by line and shift.

Is a graph builder a replacement for statistical tests?

No. It helps you find what to test. Use tests such as one-way ANOVA to judge whether a difference you see is larger than chance.

How is it different from a multi-vari chart?

A multi-vari chart is one specific graph that shows variation across nested factors. A graph builder lets you assemble that kind of view, and many others, interactively.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab