Tables and Graphs, Decided One Step at a Time, with Every Decision Critiqued
by Professor Stephen T. Abedon Steve Abedon, Ph.D., has taught well over 100 individual classes and ~10 individual courses (including introductory biology, microbiology, physiology, biochemistry, etc.) over his 30+ years as a college professor. He has over 150 publications, including multiple monographs, and is ranked in the top 1 or 2 percent among researchers of all disciplines worldwide. His research focuses on bacteriophage biology and phage therapy. (abedon.1@osu.edu)
phage.org | phage-therapy.org | biologyaspoetry.org | abedon.phage.org | google scholar | publications
Jump to: 🧭 Start | 🛠️ Build | 📂 Examples | 🔧 Repair | 🖼️ Gallery | 📜 Principles | 📚 Concepts | 📖 Terms | 🔤 Index | 🔬 More Laboratories | 🧮 More Calculators
biologyaspoetry.org/laboratories/data/ · Abedon’s Books
How can I improve this page? contact: data@biologyaspoetry.org
A table or a graph is a set of decisions. Which variable goes across and which goes up. Whether the axis starts at zero, and where it stops. How far apart the ticks are. Whether points are joined. How two series differ, and whether they still differ when printed in gray or seen by someone with a color vision deficiency. How big the text is once the figure has shrunk to fit a report or journal column. Each has a better and a worse answer, and the better answer usually depends on what the figure is meant to show.
On the Build tab those decisions come one step at a time, and every one is yours. The figure is redrawn after each, exactly as decided. A critic beside it reads every decision against what you said the figure is for, and explains itself.
Two short classroom videos cover the ideas the Build tab starts from: the first on a projected screen, the second at the blackboard. Each plays here when its picture is clicked.
Your own data, pasted or opened as a file, on the Build tab. Prepared examples, on the Examples tab, each chosen to raise particular decisions. And figures to repair, on the Repair tab: complete graphs and tables with faults already in place, which open on the same workbench with the critique showing, so that you can watch it shrink as you fix them. All three use the same workbench, and moving from one into free editing loses nothing.
The page saves as you go, in this browser only. To keep work elsewhere, save the bones: a small file holding every decision, which reopens the work exactly as it was. Every PNG exported from here carries the same information inside it, so a figure handed in as a PNG can be reopened here, by you or by an instructor, with every decision and the critique behind it.
Each data set opens on the Build workbench with a spreadsheet’s defaults in place, at the step where its first decisions come up. Every decision from there on is yours. One set is real; the rest were made for this page and are labeled as synthetic.
The comparison below is the one drawn out in Analyst Academy’s “Stop Sharing Data—Start Telling Stories”, which re-plots these data as 100% stacked bars with the total for each group alongside. Of the 2,201 people aboard, 62% of first class survived, 41% of second, 25% of third, and 24% of the crew, so the crew fared worst. Split by sex, the order changes. Female crew survived at a higher rate than third-class women (87% against 46%), and male crew at a higher rate than third-class men (22% against 17%). The crew does better within each sex and worse overall, because it was 862 men and 23 women, and men of every class survived far less often than women. A reversal of this kind is known as Simpson’s paradox.
Here the reversal rests on a one-point difference that bars can barely show; it is the counts that explain it. The lesson reaches past graphs: whenever percentages are pooled across groups of different sizes, show n.
Each case is a complete figure or table with faults already in it. It opens on the Build workbench with the critique showing and a count of how many faults there are to find. As each is fixed its name appears; the names of those still hidden can be revealed if you are stuck. Nothing stops you from doing more than the case asks, and a case can always be started again.
Specialized graphs turn up in papers, seminars, and committee packets, often without explanation. Each entry below is headed by a small drawing, so that a graph can be found by what it looks like rather than by a name you may not know. Open an entry for what the graph shows, how to read it, what to ask when one appears, how it is commonly misused, and where it is usually met. The drawings are made from synthetic data.
Entries still to be written include Manhattan plots, PCA plots, sequence logos, heatmaps of other kinds, and phylogenetic trees.
Before a table or figure leaves your hands, walk this list. The first fifteen questions are shared, word for word, with the How to Graph tab of the Classroom Probability Theory Analysis; the rest are this page’s additions.
Each principle below gives its reason, credits where the idea came from, and names the critic rules that apply it.
Drawn from the same table the critic itself uses, step by step. Open any rule for its reason. The thresholds behind these rules are provisional and will be tuned.
Short explanations of ideas that come up while building graphs. None requires mathematics beyond what you have already seen.
A logarithm answers the question: what exponent do I need? The base-10 logarithm of a number is the power to which 10 must be raised to produce it.
Zero and negative numbers have no base-10 logarithm, which is why a log axis cannot show them.
The natural logarithm (ln) uses e ≈ 2.718 as its base instead of 10. It appears in growth-rate equations (the Malthusian parameter) because continuous exponential growth multiplies by e each unit of time.
On a linear scale, equal distances represent equal differences. On a log scale, equal distances represent equal ratios — the same percentage change.
Two practical consequences:
The slope of a line on a semi-log plot (log Y, linear X) equals the growth rate in log units per X unit. Steeper = faster growth.
The number after e is the power of ten to multiply by.
The "Show the arithmetic" panel uses e-notation when values are large or small enough that writing them in full would be unwieldy. The axis number fields accept e-notation as input too.
A semi-log plot has a log scale on one axis and a linear scale on the other. The most common form in biology has log Y and linear X.
Students sometimes mistake the straight line for the data being linear. It is not — on a linear axis these same data would be a steep curve. The straight line is the signature of exponential behavior, made visible by the log scale.
An axis break is a mark — usually two short parallel lines or a zigzag — near the start of an axis, signaling that the axis does not begin at the origin.
The break mark here is cosmetic only: it signals the gap to the reader but does not skip values. The axis starts and data are placed exactly as the numbers specify. A visual gap and no mathematical gap exist simultaneously — which is what every axis break is.
Log₁₀ is the most common axis transformation in biology, but others exist:
This calculator currently offers linear, log₁₀, and natural log (ln). The others are noted here for context.
Points on a graph can be joined by a line. Whether they should be depends on what the line will be read as, and there are two possibilities.
Joining the points of a distribution across ordered categories is a recognized graphic with its own name, the frequency polygon. It exists for one job in particular: comparing two or more distributions on one pair of axes, which two sets of bars side by side cannot do legibly. The gap between two lines is far easier to read than the gap between two clouds of dots.
The reason for the line is not the same for every series. An expected series, calculated from a model or a probability rather than measured, is a real shape, and a line through it traces something that exists. An observed series is not a shape — its wobble is noise — so a line through it is a reading aid. That is still a good reason.
Two practical rules follow.
Running a line of fit past the last data point is the same error in the other direction; see Stopping a line at the last data point, below.
Whether an axis must start at zero depends on what carries the value to the reader’s eye. There are two cases.
A log axis is the one axis that cannot start at zero, because zero has no logarithm; on a log axis zero lies infinitely far down. That is acceptable for the same reason the zero rule exists. On a log axis equal distances are equal multiples, so length reports ratios exactly, and the question has changed from “how much bigger?” to “how many times bigger?”
A log axis earns its place when a quantity spans orders of magnitude and can never be zero. Both conditions matter. (One order of magnitude is a factor of 10, so values from 100 to 10,000,000 span five: 100 → 1,000 → 10,000 → 100,000 → 1,000,000 → 10,000,000.) Starting a log axis at 1, because the logarithm of 1 is zero, gives an arbitrary floor rather than a principled one; start it just below the smallest value instead.
Where a curve runs flat and uninformative for most of its length, nothing obliges you to plot all of it. Stopping shortly after the interesting part, and letting the data fill the plotting area, is a service to the reader.
There is a catch. A range chosen honestly and a range chosen because it flatters the result look identical on the page, and no reader can tell from the figure which one happened. So the rule has two halves:
The critic can check the second half. Only you can keep the first.
A line of fit, whether drawn by eye or calculated, should stop at the last data point. Beyond the data there is nothing but a guess, and a line drawn there does not look like a guess. Paul Andersen does exactly this in Graphing Data by Hand.
Joining points invents values between them; extending a line invents them beyond. The line you draw by eye in step 8 can be dragged anywhere, and the critic says so if it runs past the data.
When categories are put in order of the very values being plotted, the result rises or falls smoothly whatever the data are, noise included, because the sort made it do so. The trend is circular and is not a finding.
Sorting by an expected series is different, because that order was fixed before any data arrived. The expected line will still climb, guaranteed by the sort, but now the information lies in how far the observed series departs from it. To sort by expected values, mark that column as expected in step 2, make it the first dependent column, and choose an order by value in step 4.
A ranking is the exception, because there the order is the message. And a sorted category axis is not a numeric scale, so nothing should be fitted to it.
Paul Andersen, in Graphing Data by Hand, asks for a title good enough that both axes could be labeled from it alone. That is a sharp test, and a good drill for a graph in a notebook.
Figures for reports and journals in biology put that information in a caption instead, which carries more than a title can: what was plotted, the sample size, what any uncertainty shown means, and what was left out. Both are worth knowing; this page critiques the caption.
The convention in biology is a caption below a figure and above a table.
The word independent has two meanings in science, and they are unrelated.
A rough test: if the word describes events, and whether one shifts the odds of another, it is the probability sense. If it describes axes or the columns of a data table, it is the sense used on this page.
The companion Classroom Probability Theory Analysis uses both senses in one figure. The sum of two dice is the independent variable on its horizontal axis, while the two dice themselves are independent events and appear on neither axis.
A table can have more than one dependent variable. Here is a table with two, from Gregor Mendel’s cross of round yellow peas with wrinkled green ones: the seeds of the second generation, sorted by shape and color.
| Seed shape and color | Observed (seeds) | Expected (seeds) |
|---|---|---|
| Round yellow | 315 | 312.75 |
| Round green | 108 | 104.25 |
| Wrinkled yellow | 101 | 104.25 |
| Wrinkled green | 32 | 34.75 |
Mendel counted 556 seeds in all (315 + 108 + 101 + 32). The expected counts come from the ratio 9:3:3:1, whose parts add to 16: nine sixteenths of 556 is 312.75, three sixteenths is 104.25, and one sixteenth is 34.75.
The columns Observed and Expected look like a pair that should face each other across the two axes. They are not. Both are counts of seeds for each kind of seed, one from the experiment and one from a prediction, so they are the same kind of thing, in the same units, answering the same question. Both are dependent variables. The independent variable is the first column, the one that says which kind of seed each row is about.
Here are three questions to ask of each column:
Plotting observed against expected, one on each axis, is a real kind of figure, used to check how well a prediction did, with a line drawn where the two would be equal. It answers a different question from the one the table asks: not what shape the cases made, but how well the prediction did, and for which cases. Even there the expected values are not the independent variable. They lie along the horizontal axis, but each point is still one case, and the cases are what the independent variable names. On this page that figure is its own graph type, Observed against expected, chosen in step 4. It keeps the expected column dependent, draws the line of equality, puts both axes on one scale, and labels each point with its case.
Distance from that line is not equally informative everywhere. A miss of two on an expectation of three is a different thing from a miss of two on an expectation of 0.6.
Some numbers are names. Chromosome 21 is not twenty-one of anything, and strain 3 is not three times strain 1. Such numbers say which one, not how many or how much, so they belong with the other names on a category axis, never on a number line.
The human chromosomes show why this matters. They are named 1 to 22, plus X and Y. The numbers were given, roughly in order of size, as the chromosomes looked under the microscope. Measured in DNA, a few are out of that order. In the GRCh38 reference sequence (lengths in millions of base pairs, Mb):
So a bar graph that ranks the chromosomes by length, largest first, runs 1, 2, 3, 4, 5, 6, 7, X, 8, 9, 11, 10, 12, … 18, 20, 19, Y, 22, 21. Read as a number line, that looks like a list with mistakes in it. Read as names, it is simply what was measured.
Bare numbers mixed with letters make the trouble worse: the eye takes the numbers for a count and then has nowhere to put X and Y. A student graphing these lengths suggested the remedy: name them in full, Chromosome 1, Chromosome 2, … Chromosome Y. Every label then reads as a name. Titling the axis “Chromosome” helps as well, but the labels themselves still look like numbers.
Two practical notes. Full names are longer, and two dozen of them will not sit side by side under vertical bars; horizontal bars give each one room. And whether to rank by length or keep the numbered order is a question of purpose. Ranked, the figure answers “which is largest?”; in numbered order, a reader can find any chromosome at once. On this page, step 4 can write a word before each category name without changing the data, and the order of the categories is chosen there too.
The words this page uses, as it uses them. Several, such as independent, mean something else in other fields; the Concepts tab says more about the ideas behind them.
Presenting Data is one of a set of laboratories, each a place to try things rather than a page to read. The others are listed here by group, and all of them are on the Laboratories page.
Loading laboratories…
Know of a topic that deserves a laboratory of its own? 📝 Suggest a laboratory.