User guide · Chapter 04
Graphs
This chapter explains how to create a graph from a table, choose its type among the families Variance offers, change that type, adjust the graph with the mouse, and then set every detail with the Format Graph and Format Axes dialogs. It also covers legends, palettes, matching several graphs to an example graph, texts, shapes, embedded tables, linked constants and pictures. It ends with what each graph type is for and with good practice for presenting scientific data.
A graph is a sheet linked to a table#
In Variance, a graph is a sheet of the project, filed in the Graphs section of the navigator (shortcut Alt+4 to go there). It holds no data: it reads a table (or the output table of an analysis) and redraws itself every time that table changes. If you correct a value, add a row or edit a column title, the graph follows.
What the graph remembers itself is the way the data are presented: its type, the data sets plotted and their format (color, symbol, error bars...), the axes, the legend, the titles, the objects drawn on it, the palette. You can therefore create several graphs of the same table, of different types, and edit them independently.
The graph commands are found in several places, which all do exactly the same thing:
| Where | What |
|---|---|
| Sheet and Objects menus | New Graph…; Significance Brackets…, Compact Letter Display…, Number-at-Risk Table, Insert, Embedded Table…, Value from Notes or Results…, Picture… |
| Format menu (active graph sheet) | Graph Type…, Graph Type, Plotted Data Sets…, Match Graphs to an Example…, Edit Palettes…, Palette, Background Color…, Plot Area Color…, Frame and Crossing…, X Axis…, Y Axis…, Second Y Axis…, Axis Titles…, Data Set Style…, order and reversals, Graph Size |
| ribbon, Format group | change the graph type, Format the graph, palette, matching graphs to an example |
| ribbon, Annotate and Font groups | objects, text, equations, constants, embedded tables, pictures, comparisons |
| right-click on the graph | context menus (see below) |
| double-click on an element | the format dialog of that element |
| Inspector (right-hand panel) | the main settings of the active graph, editable without opening a dialog |
The menus and the ribbon were presented in the chapter "The interface"; this chapter focuses on what the commands do.
Creating a graph#
The automatic graph#
When you create a table with the welcome dialog (File › New Table… or Sheet › New Table…), the Also draw its graph box is checked by default: Variance creates the table and, at the same time, a graph of its default type (see "Setting the default type" below). Sheet › New Table, No Graph… creates the table alone.
The graph is a starting point: you can edit it as much as you like, and you can create others.
Creating a new graph of an existing table#
- Activate the table (or the results sheet) you want to graph. If you are already on a graph, Variance takes that graph's table.
- Choose Sheet › New Graph… or, in the ribbon, the button of the Sheets group and then New Graph of These Data.
- In the New Graph dialog, set the Data sets shown section, then the Graph type section (both detailed below).
- Click OK. The graph appears in the Graphs section of the navigator and becomes the active sheet.
If the project contains no table, Variance answers "Create a data table first". If the active sheet is a results sheet, the graph is based on the first output table of the analysis (see the note on results below). The whole creation is a single undo operation, named "New graph": one Ctrl+Z removes all the graphs created at once.
The "Data sets shown" section#
This section exists only for a new graph; the Graph Type dialog does not show it.
- Table: the drop-down list of the project's data tables. Choosing another table reloads the dialog with the default graph type of that table.
- Only the selected data sets: when unchecked, all the data sets (all the Y columns) are plotted. When checked, one box per data set appears and you keep only the ones you want. If you uncheck everything, Variance refuses: "Choose at least one data set to plot".
- Include the fitted curves: checked by default. If analyses of these data produced curves (nonlinear fit, spline or LOWESS, regression line, Bland-Altman limits...), they are added to the graph, with their confidence band when the analysis computed one. Uncheck it to get the data alone.
- One graph per data set: instead of one graph with all the data sets, one graph per data set. Useful for making a panel of identical graphs, to be matched afterwards with Match Graphs to an Example….
- Y axis title: the title of the Y axis, empty by default ("automatic"). You can also type it later in Format Axes.
The "Graph type" section#
This is where you choose the type of the graph, in three steps: the family, the tab, the thumbnail.
Graphs for is a drop-down list of the eight table types: XY, One factor, Two factors, Contingency, Survival, Proportions, Multivariable and Nested. It opens on the family of the table, because that family reads the data most naturally. You can pick another one: any table can be plotted by any family, Variance then reinterpreting its rows and columns (rows serve as X for a table that has no X, columns become groups, values become parts of a whole). When the chosen family is not the table's family, the note "(data of a … table)" says so. Changing family selects the first type of the new family.
Under the list, tabs group the types of the family. The XY and Survival families have a single tab; the others have several. The following table gives, for each family, its tabs and types (the first in the list is the default type of the family).
| Family | Tab | Types |
|---|---|---|
| XY | XY | Points joined by a line, Points only, Individual replicates, Repeated measures, each replicate connected, Individual replicates, means or medians connected, Line only, Spikes, XY bars, Area fill, Staircase |
| One factor (and Nested) | Each value | SuperPlot (Nested default), Dot plot, Dot plot with bar, Before-after, Estimation plot |
| Center and spread | Bar graph, Mean with error, connected | |
| Distributions | Box and whiskers, Violin plot, Box and violin, Raincloud plot, Range bars (min-max), High-low | |
| Two factors | Summaries | Side-by-side bars, Stacked bars, Bars in separate blocks, Points joined by lines, Area |
| Each value | Side-by-side points, Side-by-side points and bars, Overlaid points, Points in separate blocks, Repeated measures, each replicate connected | |
| Distributions | Side-by-side high-low, Side-by-side box plots, Side-by-side violin plots | |
| Heat map | Heat map | |
| Forest plot | Forest plot | |
| Contingency | Summaries | Side-by-side bars, Stacked bars, Bars in separate blocks |
| Heat map | Heat map | |
| Survival | Survival | Survival curve (staircase), Survival as points, Survival staircase with error bars |
| Proportions | Proportions | Pie chart, Donut chart, Stacked bar, Dot matrix (10×10) |
| Multivariable | Bubble plot | Bubble plot |
| Heat map | Heat map of variables | |
| Dendrogram | Dendrogram |
Clicking a tab displays its thumbnails; if the type already chosen is not in that tab, the first type of the tab is chosen. Each thumbnail is a small picture of the graph type; one click selects it, a double-click selects it and confirms the dialog (like OK). The row of thumbnails scrolls horizontally when a tab contains many.
Below the thumbnails, two columns:
- on the left, the name of the chosen type and its options: the "Plot: mean or median with error bars" choice (see "Mean or median, and error bars") for the types that have it, the Aligned or Staggered choice for the individual-replicate graphs (see "Aligned or staggered replicates"), and the Set as default for … tables box;
- on the right, Preview: a preview of the graph of your data, with the chosen type. The ◀ and ▶ arrows go to the previous or next type, from tab to tab, and the tab follows.
Confirm with OK or cancel with Cancel (or with the close box of the dialog).
Setting the default type#
Check Set as default for One factor tables (the name of the table type adapts) before confirming: the chosen type becomes the one Variance offers when this dialog opens, and the one of the automatic graph, for all future tables of that type. The preference is saved with the application preferences, not in the project. It also applies when you change the type of an existing graph: the box works in New Graph as in Graph Type.
Graph types and what they show#
This section describes each type, in the order of the families. The precision figures are those of the code: when a type depends on the mean, the median or an error bar, it is the Plot setting described in the next section.
XY family#
XY types plot y against x, for an XY table (numeric X, dates or elapsed times). Each data set is a series.
- Points joined by a line: one symbol per point, joined by a straight line, with error bars when there are replicates. Default type of XY tables: use it for a series of measurements over time or along a dose.
- Points only: the symbols alone, without a line. This is the type of choice when a fitted curve is superimposed on the data (the fit's curve serves as the line), for a scatter of points before a regression, or when a line would wrongly suggest continuity between independent measurements.
- Individual replicates: each replicate is plotted as a symbol, with no summary (no mean, no error bars). This is the most honest presentation when replicates are few.
- Repeated measures, each replicate connected: each replicate (subcolumn) is a subject or a unit followed over time: its points are joined by a line. For repeated measurements on the same animals or the same samples.
- Individual replicates, means or medians connected: all the replicates as symbols, plus a line joining the mean (or the median, depending on Plot) at each X.
- Line only: the line alone, without symbols.
- Spikes: a vertical stroke from the base of the graph to each point. Useful for a spectrum, a fine histogram or events. The thickness of the spikes is set in Format Graph, Spikes section (Thickness).
- XY bars: bars at each X value (one thick bar per point). Suited to series where X is a measured quantity, not a category.
- Area fill: the region between the line and the axis (or the base) is colored. Suited to a cumulative quantity or to a signal whose area matters.
- Staircase: a stepped line (the value stays constant until the next point): a state that changes at precise dates, an empirical distribution function.
One factor family#
One factor types plot each column as a group, with a categorical position on the X axis (the title of each column). They are used to compare groups.
Each value tab:
- SuperPlot (Nested tables default): individual technical measurements colored and shaped by biological replicate (subcolumn) behind the larger biological-replicate means and the grand mean ± error computed across biological replicates (Lord et al., 2020), with a replicate legend.
- Dot plot: one dot per value, with a horizontal line marking the mean (or the median) and, depending on the setting, error bars. This is the default type of One factor tables and the one we recommend: it shows the number of observations, their spread and the outliers. When several values fall at the same level, Variance spreads them horizontally (see Scatter appearance in Graph Settings).
- Dot plot with bar: the same dots, laid on a bar whose height is the mean (or the median). Handy for readers used to bar charts, while keeping the data visible.
- Before-after: each row of the table is a subject; its values in the different columns are joined by a line. For paired data or repeated measurements (before and after a treatment): you see each subject's trajectory, not just the mean.
- Estimation plot: in the manner of Gardner-Altman estimation plots, it shows two groups side by side with their points, then, on a floating axis on the right, the difference between the two means with its 95% confidence interval. It handles only the first two groups. The interval is that of a Student t test with equal variances (pooled variance, n₁ + n₂ − 2 degrees of freedom, computed on the raw values). It therefore shows the size of the effect, not just its presence.
Center and spread tab:
- Bar graph: one bar per group whose height is the mean, the median or the geometric mean, with error bars. Valid as a summary when the individual data are too numerous to plot.
- Mean with error, connected: one symbol per group (the mean or the median) with error bars, the symbols being joined by a line. For ordered groups (days, doses) plotted on a categorical axis.
Distributions tab:
- Box and whiskers: the box goes from the 1st to the 3rd quartile, with a line at the median, and the whiskers follow the Whiskers setting (Tukey, min-max or percentiles). With Tukey's definition, values beyond the whiskers are drawn individually. It summarizes the shape of the distribution with no assumption about its law.
- Violin plot: the density of the values, estimated with a Gaussian kernel (Silverman bandwidth), drawn symmetrically. It reveals a bimodal or strongly skewed distribution that neither the mean nor the box shows.
- Box and violin: the violin with, inside it, a narrow box and its whiskers.
- Raincloud plot: a half-violin density on one side, a slender box plot in the middle, and the jittered individual values on the other side.
- Range bars (min-max): a floating bar from the minimum to the maximum of each group, with a line at the mean or the median. To show the full range.
- High-low: a line from the minimum to the maximum and a marker at the center.
Two factors family#
Two factors types read a two-factor table: the rows (first factor) are the positions on the X axis, the data sets (second factor) are the bars or curves at each position.
Summaries tab:
- Side-by-side bars: for each row, the bars of the data sets side by side. Default type, and the one for contingency tables; you compare the data sets within each row.
- Stacked bars: the values of the data sets stacked in a single bar per row. Reserve it for parts that add up (counts, durations); stacked values are hard to compare away from the base.
- Bars in separate blocks: a distinct block of bars per data set, with its rows side by side. You then compare the rows within a data set.
- Points joined by lines: the rows of the table are placed on the X axis; each data set forms a curve of joined symbols. For measurements followed over time with two factors.
- Area: like the previous one, with the area under each curve colored.
Each value tab:
- Side-by-side points: the individual points of each cell, data set by data set, side by side.
- Side-by-side points and bars: the points laid on bars.
- Overlaid points: the points of all the data sets at the same place of each row, superimposed.
- Points in separate blocks: a block of points per data set.
- Repeated measures, each replicate connected: each replicate (subcolumn) joined across the rows, to follow a subject through several conditions.
Distributions tab: Side-by-side high-low, Side-by-side box plots and Side-by-side violin plots, which reproduce, cell by cell, the corresponding One factor types.
Heat map tab: Heat map, the table drawn as a grid of colors (see below).
Forest plot tab: Forest plot, one estimate and its confidence interval per row, with a reference line. The first three data sets of the table are read as the estimate, the lower bound and the upper bound; the reference line is at 0 on a linear axis and at 1 on a logarithmic axis (odds, risk or hazard ratios). Rows without an estimate are ignored; forest plots are horizontal.
Contingency family#
A contingency table is plotted by Side-by-side bars, Stacked bars, Bars in separate blocks (same principle as above) or Heat map. Stacked bars let you compare the compositions of one group with another; they are more readable when expressed as percentages, but the contingency table itself must contain integer counts (see the chapter "Data tables").
Survival family#
- Survival curve (staircase): the Kaplan-Meier curve as a staircase, with a small tick at each censored observation. Default type.
- Survival as points: the curve as points, one per event.
- Survival staircase with error bars: the staircase with error bars at each event. The bars are those of the Kaplan-Meier standard error (one standard error on each side, bounded between 0 and 1); they are not confidence limits.
Time is read on the X axis; survival as a percentage on Y when the axis is automatic. A number-at-risk table goes below the curve (see "Annotations").
Proportions family#
These types represent the split of a total. Only the first data set is plotted, and only strictly positive parts are kept.
- Pie chart: a pie. The parts are percentages of the total, which can be displayed on the slices.
- Donut chart: the same, with an adjustable central hole.
- Stacked bar: a single stacked bar.
- Dot matrix (10×10): a grid of 100 dots, distributed among the categories by the largest remainder method: one dot is worth 1% of the total.
Multivariable family#
- Bubble plot: a four-dimensional scatter plot: X, Y, color (a qualitative or continuous variable) and bubble size, with an optional label. You can add 95% confidence ellipses or convex hulls by color. The variables are chosen in the Inspector, Bubble plot section.
- Heat map of variables: the variables of the table as a grid of colors; the Dendrogram (hierarchical clustering of rows) option of the Inspector adds a dendrogram on the rows.
- Dendrogram: the tree of a hierarchical clustering of the rows. When the graph reads the output table of a hierarchical clustering, it takes the tree of that analysis; otherwise, Variance clusters the rows itself, on the standardized numeric variables, with Euclidean distance and average linkage between groups. At least three complete rows are needed, otherwise the graph shows "A dendrogram needs at least three complete rows" (see the chapter "Multivariate analyses").
Graphs without axes#
Pie charts, donuts, single stacked bars, dot matrices, heat maps and dendrograms have no axes: the Format Axes dialogs then apply only to the frame, the size and the titles. Heat maps and pie charts have their own settings in Graph Settings (colors, values in the cells, hole, start angle).
Mean or median, and error bars#
Many graph types summarize the values of each group or of each X by a central value and an interval. The choice is made with the "Plot: … with …" line of the New Graph or Graph Type dialog, repeated at the top of the Appearance tab of Format Graph. These two drop-down lists exist for the following types:
- XY: Points only, Points joined by a line, Line only, XY bars, Individual replicates, means or medians connected;
- One factor: Dot plot, Dot plot with bar, Bar graph, Mean with error, connected, High-low;
- Two factors: Side-by-side bars, Stacked bars, Bars in separate blocks, Side-by-side points, Side-by-side points and bars, Overlaid points, Points in separate blocks, Points joined by lines, Area, Side-by-side high-low.
Boxes, violins, before-after graphs, floating bars, estimation plots, survival graphs and individual-replicate graphs do not offer them: they plot either the values themselves or quantiles. For Individual replicates, means or medians connected, only the central value matters: none of the three replicate types draws error bars.
The central value#
| Choice | Value plotted |
|---|---|
| Mean | the arithmetic mean |
| Median | the median |
| Geometric mean | exp(mean of ln x); if a value is zero or negative, Variance falls back on the arithmetic mean |
Error bars#
| Choice | Extent of the bar |
|---|---|
| SD | center ± SD, the sample standard deviation (denominator n − 1) |
| SEM | center ± SD/√n, the standard error of the mean |
| 95% CI | center ± t × SD/√n, where t is the 0.975 quantile of the Student distribution with n − 1 degrees of freedom |
| Range | from the minimum to the maximum |
| Interquartile range | from the 1st to the 3rd quartile |
| No error bar | no bar |
Quartiles and percentiles use the rank convention (n + 1)p, with linear interpolation between the two neighboring values (the usual convention of statistical software for small samples). With a single value, the SD, SEM and CI bars have zero length.
The shape of the bar (T, short T, single line or band), its thickness, its color and its direction (both sides, above only, below only) are set data set by data set, in Format Graph (see "Error bars" below).
What to choose?#
- SD describes the spread of the observations: it does not shrink when you add subjects. It is the right bar to show the biological variability of a population or of a group.
- SEM describes the precision with which the mean is estimated; it is shorter than the SD by a factor √n, which makes graphs "cleaner" but says nothing about the variability of individuals. If you use it, do not confuse it with the SD and state it in the legend.
- 95% CI is an inferential bar: an interval built to contain the true mean in 95% of samples. Two confidence intervals that do not overlap suggest a difference, but an overlap does not establish the absence of a difference.
- Range and Interquartile range go with the median for skewed or ordinal data, or data with outliers.
In all cases, write in the figure legend or in the text what the bars represent and the number of observations (n) per group. The chapter "Principles of statistics" explains the difference between SD, SEM and confidence interval.
Box whiskers#
For Box and whiskers, Box and violin and Side-by-side box plots, the definition of the whiskers is set in Format Graph › Graph Settings (Whiskers list):
| Choice | Whiskers |
|---|---|
| Tukey (default) | up to the most extreme value lying within 1.5 times the interquartile range of the box; values beyond are plotted individually |
| Min to max | from the minimum to the maximum |
| 10-90 percentile | from the 10th to the 90th percentile |
| 5-95 percentile | from the 5th to the 95th |
| 2.5-97.5 percentile | from the 2.5th to the 97.5th |
| 1-99 percentile | from the 1st to the 99th |
With the percentile definitions, values outside the whiskers are also plotted individually. Always state in the legend which definition you used.
Aligned or staggered replicates#
When an XY table contains replicates (several subcolumns per data set), the Individual replicates, Repeated measures, each replicate connected and Individual replicates, means or medians connected types plot each replicate. In New Graph and Graph Type, a "Plot: Each replicate" line (the grayed button is a mere reminder) followed by a drop-down list lets you choose:
- Aligned: the replicates of a given X are plotted at exactly the same abscissa, one above the other. This is the usual presentation for a dose-response curve;
- Staggered: the replicates of a given X are offset side by side, by about 0.8 times the symbol size, so that they do not overlap when the values are close.
The offset is horizontal and very small: it does not change how the X axis is read.
Changing the type of a graph#
A graph created with one type can change type at any time without redoing the graph or losing its title, axes, objects or colors.
The commands#
- Activate the graph.
- Choose Format › Graph Type… (or, in the Format Graph dialog, the Graph Type… button at bottom left, or, by right-clicking the sheet, Graph Type…). The Graph Type dialog opens on the family and tab that show the current type of the graph.
- Choose a family, a tab and a thumbnail, exactly as for New Graph (see above): the dialog does not have the Data sets shown section, and its preview shows your graph with the new type. Set Plot: (central value and error bars) or Aligned/Staggered if the type offers them, check Set as default for … tables to remember this type, then click OK.
Other paths exist, without a dialog:
- Format › Graph Type… (the submenu, without an ellipsis): one submenu per family ("XY graphs", "One factor graphs", "Two factors graphs"...), with all the types; one click changes the type on the spot;
- the Change the type of graph button of the ribbon's Format group: the list of types of the table's own family;
- the Type list of the Graph section of the Inspector, which contains the types of all the families.
These three paths do not set the central value, the error bars or the replicate offset: they only change the type. The operation is undone with Ctrl+Z ("Graph type").
In Format Graph, the Graph Type… button first applies the dialog's pending changes, then closes it and opens Graph Type.
What the change keeps and what it resets#
- Kept: the data sets plotted, their colors, symbol sizes and error bars, the axes, the titles, the legend, the drawn objects, the comparisons and letters, the palette.
- Reset to the state of the new type: the display of the symbols and of the connecting line of each data set. A type with a line (for example Points joined by a line) shows them, a type without a line (Points only, Spikes...) hides them. If you had hidden or shown these elements by hand, do it again in Format Graph › Appearance.
- The Staircase type imposes the stepped line shape on all the data sets; the straight line comes back when you leave this type.
There is no command to make a graph read another table: create a new graph of the right table. The Format › Plotted Data Sets… menu only changes the data sets plotted (see "The Plotted Data Sets tab").
Editing a graph with the mouse#
The graph sheet is interactive: you select, move, resize and format directly what you see. The bar above the graph recalls the gestures: "Click to select · drag to move · handles resize · double-click to edit · right-click for more". Everything below can be undone with Ctrl+Z.
Selecting#
- A click on an element selects it: a data set, a fitted curve, the legend (or one of its entries), the title, an axis title, an axis, the plot area or a drawn object. A click on a legend entry selects the legend and is used to format the corresponding data set.
- Shift+click or Ctrl+click adds an object to the selection (or removes it).
- A drag that starts from the background of the sheet draws a selection rectangle ("rubber band"): all the drawn objects entirely contained in the rectangle are selected. The rectangle selects only objects (texts, lines, shapes, pictures, embedded tables), not data sets or the legend. With Shift or Ctrl, the existing selection is kept.
- A click on the background, or the Esc key, clears the selection.
- Ctrl+A (menu Edit › Select › All) selects all the drawn objects of the graph.
The Inspector shows at the top the Selected object section when a drawn object is selected, then in particular the Graph, X axis, Y axis, Second Y axis and Data sets sections: these are the same settings as in the format dialogs, but applied immediately.
Moving#
You move things by drag and drop:
- the drawn objects (texts, lines, shapes, pictures, embedded tables): they are positioned relative to the top-left corner of the plot area (in points); a locked object (Lock / Unlock) does not move;
- the legend, as a single block;
- the title of the graph;
- the axis titles.
You cannot move the data sets, the axes or the plot area. For fine offsetting of the points of a data set, see "The Plotted Data Sets tab".
The arrow keys move the selection by one point; with Shift, by ten points. Moves of the legend, the title and the axis titles are stored as offsets from their automatic place: the Restore Legend Position and Restore Title Position commands of the context menu bring them back. Changing the legend position in Format Graph also resets its offset to zero.
The Delete key deletes the selected objects; on the legend or the title, it hides them (to show them again: Format Graph › Graph Settings › Show the legend, or Format Axes › Titles & Fonts › Show graph title); on an axis title, it erases it.
Resizing with the handles#
When a single element is selected, square handles appear:
- on a rectangle, an ellipse or a picture: eight handles (four corners, four sides). For a picture, the corners keep the proportions; on a shape, hold Shift while dragging a corner to keep the proportions;
- on a line or an arrow: one handle at each end;
- on the plot area (click on an axis or on the background of the plot area): three handles, on the right, at the bottom and at the bottom-right corner. During the drag, the size is displayed under the corner ("260 × 180 pt", for example). The size of the plot area is the size of the graph, the one also set by Format Axes › Frame and Crossing and Graph Size.
Texts have no handles: their size is set by the font size.
Double-clicking#
| Double-click on | Result |
|---|---|
| a text | in-place editing: Enter confirms, Shift+Enter makes a line break, Esc cancels |
| another drawn object | the Format Object dialog |
| the graph title or an axis title | in-place editing of the title (Enter confirms, Esc cancels) |
| an axis or the plot area | Format Axes on the tab of the axis (X axis, Y axis, Second Y axis), or Frame and Crossing for the plot area |
| a data set or a legend entry | Format Graph on the Appearance tab, with this data set displayed |
| a fitted curve | Format Graph on the Appearance tab, with this curve displayed |
| the legend | Format Graph on the Graph Settings tab |
| the background | Format Graph |
Context menus#
A right-click selects the element under the pointer (if it is not already selected) and opens a suitable menu. There are three kinds.
On a data set or a legend entry:
- Format This Data Set… and Style of All Data Sets…: open Format Graph; the second to set all the data sets at once, with the Global box;
- Hide This Legend Entry (on a legend entry): removes the entry from the legend without touching the data set;
- quick formatting submenus, applied at once (and undoable): Symbol Color, Symbol Shape, Symbol Size (from 2 to 16 pt, or Hidden), Fill Color, Fill Pattern, Border Thickness, Error Bars (Color, Style, Direction, Thickness) and Line (Color, Thickness, Pattern). The colors are chosen from a palette of 16 shades, or Automatic (the color given by the palette);
- Send Back and Bring Forward: move the data set under the previous one or over the next one (each data set keeps its color);
- Apply This Format to All Data Sets: gives all the data sets the symbols, fills, borders, error bars and lines of this one, each keeping its colors;
- Remove This Data Set: removes the data set from the graph (not from the table);
- Show Only This Data Set: keeps only that one;
- Plot on Second Y Axis / Plot on Y Axis: sends the data set to the other Y axis (graphs with numeric axes);
- Reverse Data Sets;
- then, as in all these menus, Format Graph….
On a fitted curve: Format This Curve…, Hide This Curve, Remove This Curve.
On the legend: Format Legend…, the text submenus Font Size (from 6 to 24 pt), Bold, Italic and Text Color, then Reverse Legend, Restore Legend Position, Hide Legend. On the title: Edit Title, Format Title…, the same text submenus, Restore Title Position, Hide Title. On an axis: Format Axis…, Edit Axis Title, Scale (numeric axes), Ticks (Out, In, Crossing, None), Grid Lines (numeric axes), Numbering Font Size and Axis Thickness (from 0.25 pt to 3 pt). On an axis title: Format Axis…, Edit Axis Title, Restore Title Position, the text submenus and Axis Thickness.
On the background of the sheet: Copy Graph, Paste, Select All, Format Graph…, Format Axes…, Graph Type…, Edit Palettes…, Background Color…, Plot Area Color…, a Rotate Graph submenu, a Graph Size submenu (Smaller, Larger, Exact Size…), Add Significance Brackets, Add Compact Letter Display, Add Number-at-Risk Table, Insert a Value from Notes or Results…, Insert Text, Add Text Box, Insert Embedded Table…, Picture…, Voice Memo…, Export…, Show Rulers, Show Grid and Zoom. The Rotate Graph submenu groups orientation and ordering operations: Reverse Data Sets, Reverse Legend, Reverse Rows, Swap Rows and Columns, Horizontal / Vertical Bars.
On a drawn object: Cut, Copy, Paste, Duplicate, Delete, Bring to Front, Send to Back, Align, Distribute (at least three objects), Group, Ungroup, Lock / Unlock, Position and Size…, Line Width, Font Size (Larger Ctrl+Shift+. and Smaller Ctrl+Shift+,), Format Object….
Menus that affect how the data are presented#
A few Change commands (graph sheet) change how the table is read rather than the appearance:
- Reverse Data Sets: reverses the order of the data sets (hence of the bars and legend entries);
- Reverse Legend: reverses only the order of the legend entries;
- Reverse Rows: reverses the order of the rows, that is, of the X-axis categories of Two factors graphs;
- Swap Rows and Columns: swaps the roles of rows and data sets in a Two factors graph (rows become data sets, data sets become categories);
- Horizontal / Vertical Bars: switches bars and boxes between vertical and horizontal orientation (for the bar or box types of the One factor and Two factors families);
- Value Labels on Bars: shows or hides the values above the bars;
- Y = X Line: shows or hides the Y = X line of an XY graph of points or lines.
Drawing and writing on the graph#
Drawn objects are placed with the Objects › Insert menu, with the Annotate group of the ribbon, or with the context menu of the background. The principle is always the same: you choose the tool, then act on the sheet.
- Choose the tool: Text, Text Box, Line, Arrow, Labeled Line, Rectangle, Ellipse or Arc.
- The pointer switches to drawing mode and the help bar indicates the gesture to make.
- For a text: click where you want it, type the text, Enter confirms (Shift+Enter: new line; Esc cancels). A text box is a text with a border and a white background.
- For a line, an arrow or a labeled line: drag from the start to the end; with Shift, the line is horizontal, vertical or at 45°. An arrow has a head at its end.
- For a rectangle, an ellipse or an arc (an open half-ellipse): drag diagonally; with Shift, the shape is a square or a circle.
- A simple click, without dragging, creates the object at a default size.
- Esc or a right-click leaves the tool; clicking the same button a second time also deactivates it.
To edit an existing object, double-click it (text: in-place editing; other: Format Object), or use the context menu.
The Format Object dialog applies changes as you make them and is closed with Close; Delete object deletes the object. Its fields depend on the object:
- Text: the text box; the x² (superscript) and x₂ (subscript) buttons that apply to the selected text; Size; B**, **I, U** (bold, italic, underline); alignment **Left, Center, Right; Border; Angle; the X** and **Y coordinates; Color; Background (background of the box);
- Line: Text along the line; the coordinates of the ends; Width; Style (solid, dashes, dots...); Arrows (None, End, Start, Both); Color;
- Rectangle: position and size; Rounded corners; Border; Fill;
- Ellipse: position and size; Arc (open portion of the ellipse) with the start angle and the swept angle (start, sweep); Border; Fill (not applicable to an arc);
- Embedded table and Picture: see below;
- Group: the Locked (cannot be moved) box.
The Font group of the ribbon (size, color, bold, italic, underline, alignment) acts on the selected texts. The shortcuts Ctrl+B, Ctrl+I and Ctrl+U apply to the selected text; Ctrl+Shift+. and Ctrl+Shift+, enlarge or reduce it. Objects are handled like those of a layout: Align, Distribute, Group (Ctrl+G), Ungroup (Ctrl+Shift+G), Duplicate (Ctrl+D), Position and Size… to enter a precise position. The same functions are used for layout objects (chapter "Layouts, results and notes sheets").
Rich text#
The texts of a graph are not formatted text in the word-processor sense, but they understand a small markup language, more convenient for formulas:
| Write | Result |
|---|---|
x^{2} or cm^2 | a superscript: x², cm² |
CO_{2} or x_{i} | a subscript: CO₂, xᵢ |
10^{-3} or 10^-3 | 10⁻³ |
\alpha, \beta, \mu, \sigma, \Delta… | the Greek letters α, β, μ, σ, Δ |
\pm, \leq, \geq, \neq, \approx, \times, \infty, \degree | ±, ≤, ≥, ≠, ≈, ×, ∞, ° |
\rightarrow, \sqrt, \sum, \permil… | →, √, Σ, ‰ |
This notation is recognized in text objects, in the graph title and in the axis titles. It is not recognized in legend texts. For a complex expression, Objects › Insert › Equation (LaTeX text) opens the same text tool as Text.
In Format Object, select characters and click x² or x₂ (or type Ctrl+Shift+= for the superscript, Ctrl+= for the subscript): the text is wrapped in ^{…} or _{…}. Without a selection, it is the last character that is made a superscript or subscript.
To insert a character you cannot find on the keyboard, Objects › Special Character offers Greek Letters…, Math Symbols…, Accented Letters…, Pictograms… and Any Unicode Character… (hexadecimal code): the Insert Character dialog adds the clicked character to the selected text or, failing that, copies it to the clipboard.
Finally, a text can contain link brackets that are replaced by a live value: {info:Name} (a constant of a notes sheet) and {result:Sheet|Tab|Row|Column} (a cell of a result). You do not type them by hand: you insert them with the Insert a Value from Notes or Results dialog (see "Linked constants").
The Format Graph dialog#
Format Graph sets the presentation of the data sets and of the graph as a whole. Open it with the Format the graph button of the ribbon's Format group, with Format › Data Set Style… (which opens the Appearance tab), by double-clicking a data set, the legend or the background, or from the context menu (Format Graph…, Format This Data Set…, Format Legend…). The title of the dialog carries the name of the graph: "Format Graph - Graph 1", for example.
The dialog works on a copy of the graph: nothing changes until you click Apply (applies and leaves the dialog open) or OK (applies and closes). Each application is an undo operation ("Format graph"). Cancel discards the changes not yet applied. The preview is seen directly on the sheet behind the dialog, after Apply. The Graph Type… button, at bottom left, first applies your changes and then opens the type-change dialog.
Drawn objects, the legend position and the title position are not touched by Apply: they keep their current state on the sheet.
Four tabs: Appearance, Plotted Data Sets, Graph Settings and Annotations.
The Appearance tab#
It sets the look of one data set at a time. At the top, the Data set: list chooses the data set to set (the < and > buttons go to the previous and next). Fitted curves, if any, are at the bottom of the list under "Fitted curves". The Global box applies to all the data sets, at once, each setting you change: only the settings you change are copied, the others remain specific to each data set.
The sections displayed depend on the graph type: the bar sections show only for bar or violin types, those of XY graphs only for XY types.
Style: recalls the name of the graph type; for the types that have a central value and error bars choice, the Plot: line of the previous section appears here. Color is the main color of the data set: Auto takes it from the graph's palette (see "Color schemes"); unchecked, it gives a color picker.
Symbols:
- Show symbols: shows or hides the symbols;
- Shape: a button that opens the symbol palette. It shows each shape filled and then hollow: Circle, Square, Triangle up, Triangle down, Diamond, Plus, Cross, Star, Hexagon, Dash. Plus, cross and dash have only one variant, because they are made of strokes. Hovering over a shape displays its name;
- Size: the symbol size, from 0 to 30 points;
- Border color (Auto: the color of the symbols) and Border thickness (from 0 to 6 points): the outline of the symbol; an outline of a different color from the fill improves readability when points overlap;
- Fill: the Filled symbols box switches between filled and hollow symbols (like the palette).
Bars, spikes and areas (bar and violin types): Fill color (Auto: a lightened version of the main color), Pattern (fill pattern: Solid, Hollow, Fine dots, Medium dots, Large dots, Horizontal, Vertical, Forward diagonal, Backward diagonal, Cross, Diagonal cross, Thick variants, Bricks and Checks) and Border thickness. Patterns are useful for printing in black and white.
Bars, spikes and droplines (XY types): the Show bars, spikes or drop lines box draws a stroke from each point to a baseline: thin, it is a spike or a dropline; thick, it looks like a bar. Set Color, Width (from 0.25 to 40 points), Pattern (solid, dashes...) and Begin at Y =, the starting ordinate.
Error bars: Show error bars, then Color, Direction (Both, Above, Below), Style (T bar, Short T bar, Line, Band) and Thickness. The Band style draws a shaded band between the two limits; it suits XY curves. What the bar measures (SD, SEM...) is set with Plot:.
Connecting line or curve: Connect the points, Color, Thickness, Pattern (Solid, Dash, Dot, Dash-Dot, Dash-Dot-Dot) and Style (Straight, Staircase, Staircase in the middle). For XY graphs, two boxes are added: Line starts at the origin (the line starts at the origin of the axes) and Break lines around symbols (the line stops before each symbol). This section is grayed out for the XY bars and Spikes types, which have no line. For the Points only type, checking Connect the points turns the graph into Points joined by a line.
If the data set has a fitted curve, the Format the fitted curve link leads to it: the curve has its own format, distinct from the connecting line.
Area fill (XY types): the Fill the area below the line box colors the area between the line and the axis; Fill color (by default, the color of the data set, translucent) and Position: Below (between the line and the bottom, or Y = 0) or Above (between the line and the top). For the Area fill type, only the fill color is offered.
Additional options:
- Plot data on: Y axis or Second Y axis. Choosing the right axis displays it (see "Format Axes", Second Y axis tab);
- Labels: Show the row label next to each point writes the title of its row next to each point;
- Legend: Show the legend (valid for the whole graph);
- outside Global mode, Show this data set in the legend and Legend text, the text of the legend entry (empty: the title of the data set).
Fitted curves#
When the graph contains a curve coming from an analysis (nonlinear fit, spline, regression line...), it appears in the Data set: list under the "Fitted curves" heading, in the form "Curve: name (analysis)". Its page has:
- Show the curve, Color (Auto: the color of the data set it relates to), Thickness, Pattern;
- Show the confidence band: the confidence or prediction band that the analysis computed; the box is grayed out if the analysis did not compute one for this curve. The "Format the symbols and lines of …" link goes back to the data set.
In the Plotted Data Sets tab, each curve has a visibility box, a Format… button and a Remove button. Removing a curve from the graph does not delete the analysis.
The Plotted Data Sets tab#
It chooses the data sets plotted, their order and their offset.
- The list, on the left, gives the drawing order, which is also the legend order: the first data set is drawn first (behind the others), the last one in front. A hidden data set is followed by "(hidden)".
- Add… opens a menu grouped by table so you can add data sets from the primary table or from any other data or results output table in the project; Replace… swaps the selected series in place; Remove removes the selected data set from the graph (not from the table).
- Reorder: First (at the head of the list: drawn behind all the others), Up, Down, Last (at the end of the list: drawn in front of all the others) and Reverse (reverses the list). The drawing order is also that of the legend and, for bars, of the position within each group.
- Selected data set: Visible ("a hidden data set keeps its format"), Series placement on grouped graphs (Follow graph type, Stacked, or Superimposed), and Shift all points by X** and **Y (in points): shifts all the points of the data set on the sheet, for example to avoid two curves overlapping exactly.
- Fitted curves: the list of curves, see above.
The Format › Plotted Data Sets… command opens another, simpler dialog, named Plotted Data Sets: one box per data set of the table, with two arrows to move it up or down, Reverse order and Check all. Unchecking a data set that was plotted hides it (its format is kept); checking it shows it again or adds it to the graph.
Both dialogs present the same list in the same order: from top to bottom, the drawing and legend order, the first data set being drawn behind.
The Graph Settings tab#
It sets what concerns the whole graph. The sections and options vary with the type:
Graph:
- Orientation (Vertical or Horizontal), Width of bars and groups (slider from 0.1 to 1: the width of the bars relative to the space of each category) and Individual points (Show the values over bars and boxes superimposes the individual values on the bars and boxes), for the types with categorical positions;
- Scatter appearance: how to spread the points of a scatter when several values touch (types Dot plot, Dot plot with bar, Side-by-side points, Estimation plot, and individual values shown over bars, boxes or violins with Show the values over bars and boxes): Standard (by density) (spread according to local density), Classic (symmetric spread), Expanded (random) (random, reproducible horizontal offset);
- Whiskers: see "Box whiskers";
- Y = X line: the Show the line Y = X box (XY types of points and lines). Useful for comparing two measurements of the same quantity;
- Palette: the graph's palette (see "Color schemes"). Choosing a scheme resets the colors of all the data sets to automatic.
Legend: Show the legend, Position (Right, Inside, top right, Inside, top left, Below), Border (a frame around the legend) and Reverse order. Changing the position cancels the offset obtained by moving the legend with the mouse.
Heat map (heat maps): Standard (Viridis, Magma, Inferno, Plasma, Gray, Blue, Rainbow, Double gradient); Show values and Cell borders. For heat maps of variables, the dendrogram is set in the Inspector.
Pie (pies and donuts): Hole (diameter of the donut's hole), Start angle (in degrees, from twelve o'clock, clockwise) and Show percentages.
The Bubble plot settings (X, Y, color, size and label variables, ellipses, hulls) are in the Inspector, Bubble plot section, not in Format Graph.
The Annotations tab#
Labels on bars (bar types: Bar graph, Dot plot with bar, Side-by-side bars, Bars in separate blocks, Stacked bars): Show labels on the bars writes above each bar its value or its count. For the other types, the text states that labels go on bar graphs. Options:
- Show: Value plotted and Number of values (n);
- Decimals: Automatic or from 0 to 6;
- Prefix and suffix (for example "%" or "n = ") and Thousands separator;
- Font: the size and color of the text;
- Direction: Horizontal or Vertical;
- Position: Above the bars or Inside the top of the bars.
The Format › Value Labels on Bars command shows or hides these labels in one click, with the default settings.
Annotations from analyses: this section appears only after the insertion, through the Objects menu (or the sheet's context menu), of significance brackets, group letters or a number-at-risk table. It lets you adjust or remove them (see the next section).
Comparisons, letters and numbers at risk#
These three elements come from analyses already done on the same data. Variance computes nothing in the graph: it reads the results of the analysis (see the chapters "Comparing groups" and "Survival analysis").
Significance brackets#
Significance brackets link the groups compared, with asterisks or the P value.
- First run an analysis that produces pairwise comparisons on the graph's data (a t test or an ANOVA with multiple comparisons).
- Activate the graph, then choose Objects › Significance Brackets… (or the Significance brackets, compact letters, number at risk button of the ribbon). If no suitable analysis exists, Variance answers "No analysis of these data provides comparisons: run a t test or an ANOVA with multiple comparisons first".
- In the Significance Brackets dialog, choose the analysis (Comparisons from:), check the comparisons to plot in Comparisons to plot: (each line gives the two groups and their P), then set: Show (Asterisks or P values), Prefix of P values ("P = " by default), Comparisons shown (Only when P ≤ a threshold, 0.05 by default), Font size, Brackets (thickness and color: by default that of the axes).
- Click OK. The command can be undone. To edit or remove the comparisons, run the command again: the dialog reopens with the Remove the comparisons button.
Only column-to-column comparisons are offered, not row comparisons. The asterisks (or "ns" for not significant) follow the test convention described in the chapter "Comparing groups".
Group letters (Compact Letter Display)#
In an analysis that produces letters, Objects › Compact Letter Display… writes one or more letters above each bar or each group: two groups that share a letter do not differ significantly. If the graph already has some, the command opens Format Graph on the Annotations tab so you can edit or remove them. The settings (Annotations from analyses section of the Annotations tab) are: the font size, Above the plot area (above the plot area rather than above the bars) and the style of the letters: a, b, c, A, B, C or 1, 2, 3.
Numbers at risk#
For a survival graph of a Survival table, Objects › Number-at-Risk Table (or Objects › Number-at-Risk Table) adds below the curve, on the same time scale, the number of subjects still at risk in each group. On another graph, Variance answers "The number-at-risk table goes below survival curves of a survival table". The options (size, Title, Group colors, Separators, Border) are set in Format Graph › Annotations, Annotations from analyses section. The number at risk is an indispensable complement to a Kaplan-Meier curve: it shows the precision of the curve where subjects become scarce.
To remove one of these elements, use Remove at the right of its line, in the Annotations tab.
The Format Axes dialog#
Format Axes sets the frame of the graph, its size, each axis and the titles. Open it with Format › Axes › Frame and Crossing…, X Axis…, Y Axis…, Second Y Axis… or Axis Titles… (each command opens the corresponding tab), by double-clicking an axis or the plot area, or from the context menu (Format Axes…, Format Axis…). Like Format Graph, it works on a copy and has OK, Apply ("Format axes" operation) and Cancel. The title of the dialog is "Format Axes - " followed by the name of the graph. Five tabs: Frame and Crossing, X axis, Y axis, Second Y axis and Text.
Lengths are expressed in centimeters or inches according to the units in the preferences (Tools › Preferences…).
The Frame and Crossing tab#
Plot area size: X axis length and Y axis length give the size of the plot area (from 40 to 2,000 points). The Shape: list (Choose…) imposes a width/height ratio computed from the width: Square, Wide (4:3), Very wide (16:9) or Tall (3:4). The Journal preset: list applies one of 9 publication figure presets matching published journal artwork rules (Nature single (89 mm) and double column (183 mm, 5–7 pt text), Science single (55 mm) and 2-column (120 mm, 6–8 pt text), Cell single (85 mm) and full width (174 mm, 6–8 pt text), PNAS single (87 mm) and double column (178 mm, 6–8 pt text, never below the 6 pt minimum PNAS asks for), and PLOS full width (190.5 mm, 8–12 pt text)), setting plot size, axis thickness, and typography in one click (also available in the Inspector and in layout Page Size…). What you set here is the size of the plot area, not that of the whole graph with its margins; it can also be set with the mouse (handles) and with Graph Size.
Axes: thickness and color:
- Thickness of axes: from 0.25 to 4 points;
- Plot area color: the box colors it (a very light gray by default); unchecked, the plot area is transparent;
- Color of axes and texts: the color of the axes, ticks and texts (the one used by default for titles, numbers and legend);
- Page background: the background color of the graph.
Frame and Grid Lines: a preview of the graph, and:
- Frame style: No frame (X and Y axes) (two axes only, the default presentation), Detach the X and Y axes (the axes stand apart from the plot area), Plain frame (a complete frame), Frame with ticks (a frame with ticks on all four sides);
- Hide axes: Show X and Y, Hide X, Hide Y or Hide X and Y;
- Major grid and Minor grid: None, Horizontal (Y), Vertical (X) or Both; the minor grid follows the minor ticks (see Minor ticks below);
- Grid lines: the color (Auto: light gray), thickness and pattern of the grid.
Origin: where the axes cross.
- X axis: At the bottom (at the bottom of the plot area) or Crosses the Y axis at Y = a value (0 by default): the X axis then crosses the graph at that height, which suits positive and negative values (a deviation from a reference);
- Y axis: At the left or Crosses the X axis at X = a value. Disabled when the X axis carries categories.
The axis tabs: X axis, Y axis, Second Y axis#
The three tabs have the same sections. The options of a category axis (the X axis of a column, grouped or parts-of-whole graph) are limited to those that make sense: categories are evenly spaced, their range cannot be set, and there is neither scale nor additional ticks.
Breaks and direction:
- Standard: the axis increases in the usual direction;
- Reverse: the axis is reversed (values grow downward or leftward);
- Two segments and Two segments, reversed: an axis interrupted ("break") into two segments. The Gap from, to and First segment ends at settings give the bounds of the removed part and the position of the break along the axis, that is the share of the axis allotted to the first segment (from 10 to 90%). This makes it possible to display data whose orders of magnitude are very different; use it with caution: a broken axis can suggest differences the data do not have, and the break must be indicated in the legend.
- Three segments and Three segments, reversed: two breaks, hence three segments. First gap from, to and First segment ends at set the first break, Second gap from, to and Second segment ends at the second one (its position along the axis, in % of its length, beyond the first; it counts only when its values and its position follow those of the first). With one or two breaks, Break marks chooses how each break is drawn: Slashes (two short slanted strokes, the default), Zigzag or Gap only (the axis is only interrupted).
- Switching to two or three segments unchecks "Automatic range and tick spacing" and sets Minimum and Maximum to the range the axis shows at that moment: the breaks are offered within that range and no longer move when the data change. A break that falls outside the range of the axis is ignored. The points of an XY graph that fall inside a break are not drawn; in column and grouped graphs, a value that falls inside a break (point, bar, mean, error bar) is placed at the nearer end of the break.
Scale:
| Scale | Use |
|---|---|
| Linear | the ordinary scale |
| Log 10, Log 2, Ln | logarithmic scale in base 10, 2 or e. Zero or negative values cannot be placed on a logarithmic axis: they are not drawn. Use it for concentrations, doses, ratios, viral loads, data that span several orders of magnitude |
| Probability (%) | normal-quantile scale; the values are percentages (the automatic range goes from 1 to 99). A proportion that follows an S-shaped curve becomes a straight line: useful for dose-response curves plotted in percentages |
Automatic range and tick spacing: checked (the default), Variance chooses the range and the tick interval. Unchecked, Minimum and Maximum (Range section) become editable, as does the interval of the major ticks.
All ticks: Ticks direction (Out, In, Crossing, None), Tick label angle (0°, 30°, 45°, 60°, 90°) to tilt numbers or category names that are too long, and Ticks length (Short, Normal, Long, Very long).
Regularly spaced ticks:
- Major tick spacing: the spacing between major ticks, with the auto box; editable only if the automatic range is unchecked;
- Decimals: Auto or from 0 to 6 decimals for the numbers;
- Minor ticks: None or from 1 to 9 minor ticks between two major ones;
- Thousands: Separate thousands (10,000);
- Prefix and Suffix: a text before or after each number (for example "%" or "µM");
- Log axis: Label as powers of 10 writes the ticks of a logarithmic axis as powers (10², 10³…).
Extra ticks and grid lines: a table in which each row is an additional tick or reference line: At X = (the value), Line (draws a line across the plot area) and Text (the text of the tick, by default the value). The ✖ button deletes a row, + Add a tick or a grid line adds one. This is the way to mark a threshold (for example a detection limit or the value 1 of a ratio).
Dates and times: when the X values of the table are dates or elapsed times, the X axis tab begins with a list that sets the format: Dates (2026-01-31) or times (h:mm), Day and month (31 Jan), Month and year (Jan 2026) or Numbers (days since the first date, hours).
Second Y axis: the tab is useful only if a data set is plotted on the right axis (Plot data on › Second Y axis in Format Graph, or Plot on Second Y Axis in the data set's context menu). Otherwise it displays "No data set is plotted on the right Y axis". When it is used, the Show the right Y axis box shows or hides it. Two Y axes are justified for two quantities with different units measured on the same subjects; make sure the colors of the curves and those of the axis titles show which axis reads which curve.
The Titles & Fonts tab#
Graph title: Show graph title and the text of the title, Font…, and Distance from top of graph.
Axis titles: one row per axis (X axis, Y axis, Second Y axis) with the text of the title, a Font… button and Shift from automatic place, an offset from the automatic place (vertical for the X axis, horizontal for the Y axes). You can also move an axis title with the mouse.
Tick labels: a Font… button for the numbering of each axis (the current size and style are recalled), and one for the Legend.
Font of the graph: the base font of the whole graph (Arial sans-serif, Times New Roman / Georgia serif, or Courier New monospace), except for texts that have their own font.
The Font dialog that opens with Font… offers: Font (Arial, Times New Roman, Georgia, or Courier New), Style (Regular, Bold, Italic, Bold italic), Size (from 4 to 96 points, typed or from a list), Effects › Color (Auto: the color of the graph's axes and texts) and a preview "AaBbYyZz". It is applied with OK; it changes the graph only at the next application of the Format Axes dialog.
Legends#
The legend lists the data sets of the graph, each with its symbol, its line or its color, and the title of the data set (its legend entry).
- Showing or hiding it: Format Graph › Graph Settings › Legend › Show the legend (or the Show the legend box of the Appearance tab), Hide Legend in its context menu, or the Delete key when it is selected.
- Placing it: Format Graph › Graph Settings › Legend › Position: Right (to the right of the plot area), Inside, top right, Inside, top left (inside the plot area) or Below (under the graph). You can then move it with the mouse or the arrow keys; Restore Legend Position brings it back to the chosen position.
- Its frame and its order: Border adds a frame; Reverse order (or Reverse Legend) reverses the list.
- The text of an entry: Format Graph › Appearance, Legend text field of the data set (empty: the title of the table's data set). Show this data set in the legend hides the entry without hiding the data set; Hide This Legend Entry (context menu of an entry) does the same.
- Its font: Format Axes › Titles & Fonts › Tick labels › Legend › Font….
Bubble plots have additional legends (color gradient of a continuous variable, bubble sizes), which can be reversed in the bubble plot settings of the Inspector.
Color schemes#
A graph takes the colors of its data sets from a scheme (palette): the first color for the first data set, and so on, starting over when there are more data sets than colors.
Choosing a scheme: Format › Palette (list of all the schemes, with Next Palette and Previous Palette to browse them), the scheme button of the ribbon's Format group, or Format Graph › Graph Settings › Palette. The built-in schemes are: Standard (the default), Grayscale, Classic Light, Classic Dark, Okabe-Ito, Tol Bright, Tol Muted, Accessible Vivid, Blossom, Ocean, Pastel Night, Mineral, Retro 1 to Retro 6, as well as Viridis, Magma, Inferno and Plasma (with "(translucent)" variants for some). A My Palettes submenu groups the schemes you have saved.
Defining your own scheme: Format › Edit Palettes…, or the command of the same name in the ribbon's scheme menu.
- The Edit palettes dialog starts from the graph's scheme. Type its name in Name (by default, that of a built-in scheme followed by "(custom)").
- Click each of the ten swatches of Colors of data sets 1 to 10 to choose the color of the corresponding data set. A preview shows them.
- Apply to the current graph saves the scheme in the project and applies it to the graph; Save in the project saves it without applying it; Cancel discards.
Applying a scheme (Format › Palette menu, Format Graph, the Inspector or the ApplyColorScheme script command) gives the graph its data set colors, but also its background (Background) and the color of the axes and texts (Axes and text). To change them afterwards without changing the scheme: Format Axes › Frame and Crossing, Format › Background Color… and Plot Area Color…. New graphs receive the preferences' scheme in the same way.
Matching several graphs to an example#
For a panel of figures, the graphs must have the same axes, the same size, the same fonts and the same colors. Match Graphs to an Example… copies the presentation of a model graph to other graphs of the project.
- Activate the model graph: it will serve as the example.
- Choose Format › Match Graphs to an Example… or the Match graphs to an example graph button of the ribbon.
- The Match Graphs to an Example dialog displays "Example graph: " and the name of the model. In Apply to:, check the graphs to update (all the others are checked at the start).
- In Properties:, check what is to be copied:
- Axes (range, ticks, scale, frame): the three whole axes, with ranges, scales, ticks, fonts, grid or not; the frame and the thickness of the axes. The axis titles of each graph are kept;
- Size of the plot area: width and height;
- Fonts: the base font of the graph, the title size and the legend size;
- Symbols, bars, colors and error bars: the format of each data set (symbols, lines, bars, error bars, axis), the palette, the central value and error bars choice, and the background colors of the graph and of the plot area. Data sets are matched by rank (the first data set of the model to the first data set of each target, and so on).
- Click Apply. The status bar announces "N graph(s) updated"; everything is undone at once with Ctrl+Z ("Match graphs to an example").
The command touches neither the type of the graphs, nor the data sets plotted, nor the titles, nor the legend, nor the drawn objects.
Embedded tables, linked constants and pictures#
A graph can carry, in addition to the plot, elements that stay linked to the project: a table, analysis values, a picture. They are placed with the Objects menu (or the context menu of the sheet background, or the ribbon's Annotate group), like objects that you move and delete with the mouse.
Embedded table#
An embedded table displays, on the graph, the contents of a data table or of a results page. It updates when the source changes: editing the source table is enough.
- Activate the graph, then Objects › Embedded Table….
- In the Embedded Table dialog, choose the Sheet (a data table or a results sheet, with its section in parentheses).
- For a results sheet, choose the Part: one of its results tabs, or Output table (its output table).
- Set Font size (from 5 to 24 points), Rows shown (maximum number of rows, up to 500), Grid lines and Bold header, then click OK.
The table appears at the top left of the plot area. Move it with the mouse; double-click it to change its position, font size, number of rows, grid and bold header (Format Object dialog). To show another source, delete it and create a new one. Embedded tables are used, for example, to attach to the graph the descriptive statistics of an analysis.
Linked constants#
To write in a graph a value that must stay up to date (the P of a test, a fitted EC50, the number of subjects, an experiment name), you insert a linked constant instead of retyping the number.
- Objects › Value from Notes or Results… opens the Insert a Value from Notes or Results dialog. It recalls that the text stays linked: it is updated every time the constant or the results change.
- On the left, Constants lists the constants of the project's notes sheets, in the form "name = value". On the right, Analysis results lists, after you choose a results sheet and a tab, each result cell ("label (column) = value").
- Click the value you want, then OK.
A text is added to the plot area, of the form "Name: {info:Name}" or "Label: {result:Sheet|Tab|Label|Column}" (the tab and the column are identified there by their number, starting at 0): edit it like any text (double-click) to remove the label, add the unit, put the value in a sentence. Only the part between braces is replaced by the value: keep it exactly as it is. If the source is deleted or cannot be found, the text between braces stays displayed as it is.
Pictures#
Objects › Picture… (or the button of the ribbon's Annotate group) places a picture on the graph: a PNG, JPEG, GIF, BMP, TIFF, TGA, ICO or PCX file. The picture is embedded in the project (it no longer depends on the original file); it appears at the top left, at a width of at most about 300 points. Move it with the mouse, resize it with the corner handles (the proportions are kept). The Format Object dialog (double-click) offers:
- the position and size; Original proportions restores the width/height ratio of the cropped picture;
- Rotate: turns by 90° to the left (⟲) or to the right (⟳);
- Crop (% of each side): crops up to 45% on each side (left, top, right, bottom);
- Border: a frame around the picture.
What each graph type is for#
The following table links a question to a graph type.
| You want to… | Recommended type |
|---|---|
| compare groups while showing every observation | Dot plot (One factor), Side-by-side points (Two factors) |
| show biological and technical replicates together | SuperPlot (Nested tables) |
| combine distribution density, summary quartiles, and raw points | Raincloud plot (One factor / Nested) |
| compare groups without cluttering the picture, with many observations | Box and whiskers, Violin plot, Box and violin |
| show a central value and its precision | Mean with error, connected, Dot plot with mean and SD or CI |
| show the effect of a treatment in the same subjects | Before-after (or Repeated measures, each replicate connected) |
| show the size of a difference between two groups | Estimation plot |
| follow a quantity over time or along a dose | Points joined by a line, Points only (with a fitted curve) |
| plot a dose-response or calibration curve | Points only + fitted curve, with X on a logarithmic scale |
| compare two factors (treatment × sex, dose × time) | Side-by-side bars, Points joined by lines, Side-by-side points |
| show the composition of each group | Stacked bars |
| represent a matrix of values (gene expression, correlations) | Heat map, Heat map of variables |
| present estimates and their intervals (odds, risk or hazard ratios, meta-analysis effects) | Forest plot |
| present the survival of groups | Survival curve (staircase) with Number-at-Risk Table |
| describe the split of a total | Pie chart, Donut chart, Dot matrix (10×10), or better, bars |
| explore multiple variables | Bubble plot, Dendrogram |
Good scientific practice#
- Show the data. A bar chart with error bars hides the number of observations, their spread and any outliers: several very different distributions give the same bar. When groups are small (about twenty values or fewer), plot all the points (Dot plot); beyond that, switch to the box or the violin, with or without the points (Individual points).
- Say what the bars represent. SD or SEM, 95% CI or range: write it in the figure legend, with the number of observations per group. The SD describes the data, the SEM and the CI describe the uncertainty of a mean. Pair mean with SD (or CI), median with interquartile range.
- Use a logarithmic axis for concentrations, doses and ratios. Data that vary multiplicatively (concentrations, titers, viral loads, odds ratios) spread out better and errors become comparable on a log scale. For doses, a logarithmic X axis is the rule (zero values cannot be plotted on it: give the control a separate point, a broken axis or a separate label).
- Start bars at zero. The height of a bar represents a quantity: an axis whose origin is not zero exaggerates differences. Points, for their part, do not need zero.
- Flag broken axes and avoid using them to dramatize a gap.
- Look at the same subjects together. For paired data or repeated measurements, join the values of the same subject (Before-after) rather than comparing two means.
- For survival, give the number at risk and the censoring: it is the necessary complement of a Kaplan-Meier curve.
- Do not let a graph stand in for an analysis. Error bars that overlap or not do not replace a test; significance stars say nothing about the size of the effect or its importance. Give the exact P value when possible and a confidence interval of the difference (the Estimation plot shows it).
- Think of all your readers. Choose a scheme suited to color vision deficiencies (Okabe-Ito, Tol Bright…), double the color with the shape of the symbols or the pattern of the bars, check that the figure stays readable in black and white.
- Make the figures of one article consistent (same axes, same fonts, same colors per group) with Match Graphs to an Example…, and use Journal preset (or set sizes manually) so that dimensions and typography match your target journal at final print size (for example 5–7 pt for Nature, 6–8 pt for Science, Cell and PNAS, 8–12 pt for PLOS).
- Avoid pie charts for comparing parts: the eye reads angles poorly; a bar graph is more precise.
- Use two Y axes with caution: they allow any curves to be superimposed, and the apparent correlation depends on the scale chosen.
Common mistakes#
- Changing the type erased my symbols or my lines. A type change resets the display of the symbols and lines to the state of the new type: redo it in Format Graph › Appearance.
- The colors I had chosen disappeared. Choosing a scheme (or another scheme in Graph Settings) resets all the colors to automatic.
- My error bars do not match my legend. Check the Plot choice: SD, SEM, CI, range or interquartile range. With a table of summaries, the bar is the one you entered.
- A curve or a point is missing on a logarithmic axis. Zero or negative values cannot be placed on a logarithmic axis.
- I cannot set the tick interval. First uncheck Automatic range and tick spacing in the axis tab of Format Axes.
- The horizontal graph does not obey the X tab. Values are set in Y axis even when the bars are horizontal.
- Significance Brackets does nothing. You first need an analysis with multiple comparisons on the same data.
- **My text with
^or_displays strangely.** Superscripts and subscripts must be written with braces:x^{2},CO_{2}. - The object does not move. It may be locked (Lock / Unlock) or part of a locked group.
- Undoing a change to the graph. Ctrl+Z undoes the last operation (format, type, moved object...); each Apply is one operation.
Going further#
- Chapter "Data tables": the table types and entry formats, replicates and summaries, Point Style to highlight points.
- Chapter "Layouts, results and notes sheets": assembling several graphs in a layout, aligning graphs, notes sheets and their constants.
- Chapter "Import, export, print": exporting a graph to PDF, SVG, PNG or EMF, setting the resolution, copying into Word or PowerPoint.
- Chapters of the statistics tutorial: "Principles of statistics" (SD, SEM, confidence interval), "Comparing groups" (multiple comparisons and letters), "Curve fitting" (fitted curves on a graph), "Survival analysis" (Kaplan-Meier curves, numbers at risk), "Method comparison and ROC curves", "Multivariate analyses" (heat maps, dendrograms, bubble plots).