KAHIBARO
Discord Login Register

Create Publication-Quality Figures

Planning Your Final Figures

In the final project you will move from “quick diagnostic plots” to figures that could appear in a paper, thesis, or conference talk. This is not about making plots pretty for their own sake. The goal is to communicate your physics results clearly and honestly.

Think of your figures as part of your analysis result, not as decoration. That means you should decide in advance:

What quantities need to be shown.

Which comparisons or fits are important.

Which plots are for internal checks only and which will go into your final report.

You should end up with a small, focused set of figures, each with a clear message.

A publication-quality figure must be clear without additional explanation, must represent the data and uncertainties honestly, and must be reproducible by re-running your analysis.

In your final project directory, it is a good idea to keep a dedicated subdirectory for figures generated by ROOT, separate from intermediate plots you used for debugging.

Choosing What to Show

Start from the physics questions of your project. For each question, identify at most one or two key plots that address it directly. Examples include:

A distribution of a reconstructed quantity, for example an invariant mass peak with a fitted model.

A comparison of data and a simple background model or simulation.

A dependence of one observable on another, for example efficiency vs energy, shown as a graph with uncertainties.

Avoid dumping many overlapping or redundant plots into your report. Internal cross checks, such as intermediate calibration histograms or low-level detector variables, are important during development, but they usually do not belong in the final set of figures unless they directly support a main argument.

When you choose what to show, also decide what needs to be visible on each plot:

The main features of interest, peaks, tails, cut edges.

The statistical uncertainties, error bars or bin errors.

Any model or fit you are comparing to the data.

The range in the variable that is physically relevant.

If a single plot becomes too crowded, split it into panels, use more than one figure, or move secondary information to an appendix.

Consistent Styling Across Figures

Publication-quality figures from one analysis should look like they belong together. Readers should be able to recognize that they are from the same study. Consistency is more important than any particular aesthetic choice.

Use the same general style settings across your final project:

The same font family and similar font sizes for all axes and labels.

The same line widths and marker sizes for similar types of data.

The same color conventions, for example data in black, signal model in red, background in blue, across all relevant plots.

ROOT provides global style control through TStyle and the global object gStyle. In your analysis code, you can configure this once, for example right after creating your main macro entry point or at the beginning of your plotting function, and then rely on it for every plot.

Typical elements you want to unify are:

Whether statistics boxes are shown or hidden.

Default axis fonts, sizes, and offsets so labels do not overlap.

The presence or absence of titles generated automatically by ROOT.

Canvas background color and frame style.

Set and use a single global style for all your final figures. Do not manually tweak each plot in an inconsistent way. Consistency improves readability and helps avoid mistakes.

You can also define helper functions in your project such as SetGlobalStyle() or ApplyStyle(TH1* h) that configure histograms and graphs in a uniform way. This also supports reproducibility, since all styling is defined in code.

Making Axes Clear and Informative

Axes carry much of the information in a scientific figure. Poorly labeled axes can make otherwise good analysis results unusable. In ROOT you can control axis titles, label formatting, ranges, and more.

For every axis, make sure you:

Provide a descriptive title, including the symbol and units.

Use a clear and readable scale, linear or logarithmic as appropriate.

Choose a range that shows relevant structure without wasting space.

In ROOT, axis titles are typically set with:

For histograms, hist->GetXaxis()->SetTitle("...") and hist->GetYaxis()->SetTitle("...").

For graphs, similar access through graph->GetXaxis() and graph->GetYaxis() after drawing on a canvas.

Units should always appear explicitly. For example:

$E_{\gamma}$ [MeV]

Time of flight [ns]

$dN/dE$ [counts / MeV]

You can also use TLatex syntax in titles for Greek letters and math symbols, for example "#phi [rad]" or "p_{T} [GeV/c]". Be consistent with the notation you use in your text and formulas in the report.

Pay attention to tick mark density and label overlap. For small figures in a report, consider:

Increasing title size and label size relative to the default.

Adjusting label offsets so axis titles do not collide with tick labels.

Using fewer significant digits on the labels when the scale is large.

If you use logarithmic axes in ROOT, for example pad->SetLogy();, ensure all data shown are positive and that the range excludes zero. If your distribution includes zero bins, you may want to adjust the minimum to a small positive number.

Every axis must have a descriptive title with units, and the chosen range must reflect the physics, not hide or exaggerate features.

Showing Uncertainties and Fits Honestly

Publication-quality figures must show uncertainties correctly. Readers often rely on your plots to judge the quality of your measurement and the reliability of any fits or models.

There are two main types of objects you will use:

Histograms with bin errors, especially when representing counts or rates.

Graphs with error bars, TGraphErrors or TGraphAsymmErrors, for measured points.

In your final project you should:

Enable and fill bin errors for histograms when appropriate, for example by using Poisson counting errors or by calling Sumw2() before filling when using weights.

Use graphs with error bars instead of plain TGraph when you show measurements derived from fits or external data.

Avoid smooth curves that have no defined uncertainty, unless they are purely illustrative or simple theoretical models.

ROOT can perform fits to histograms and graphs with TF1. For publication-quality figures:

Choose fit ranges that correspond to the model’s validity.

Make sure you show both data and fit clearly, for example by using different line styles and colors.

Do not hide poor fits. If a model does not describe the data, that is important information.

It is often helpful to visualize the fit quality by plotting residuals or a ratio between data and fit in a separate pad or subplot. This requires more advanced canvas layout, but even in a beginner project you can create a second histogram for residuals and draw it underneath the main one.

Always show statistical uncertainties on data points or bins when they matter for interpretation. A smooth line alone is not a data measurement.

If you quote fit parameters in your report, ensure the plot uses the same function and range, and that any parameter values printed on the figure, for example via the statistics or fit box, match the values in the text. It is better to control this manually than to rely on default statistics boxes.

Using Legends, Labels, and Annotations

As soon as you show more than one dataset, function, or model in a single figure, legends and annotations become essential. The reader should be able to understand what each plotted object represents without reading the surrounding text.

In ROOT, legends are handled with TLegend. For publication-quality figures, you should:

Use clear, descriptive legend entries, for example "Data", "Signal model", "Background estimate", instead of generic labels.

Match marker, line color, and line style in the legend to those on the plot.

Place the legend where it does not obscure important features.

For multi-panel plots, you can either use a single legend for all panels or smaller legends in each panel, but keep the naming consistent.

Text annotations are provided by TLatex and TText. TLatex is particularly useful because it supports LaTeX-like syntax for symbols and superscripts. Typical annotations include:

Experiment or data set name.

Collision system or beam type.

Center of mass energy, integrated luminosity, or run period.

Selection region, for example "Signal region" or "Sideband".

Any special conditions, such as "Preliminary" when appropriate.

When you add text to a plot, avoid clutter. A few concise annotations can add important context, but too much text can distract from the main data. If necessary, increase the canvas size or adjust the layout to keep annotations readable.

Every plot with multiple curves or datasets must include a clear legend or equivalent annotations so the reader can identify each element without ambiguity.

You should also ensure your labels and annotations use a consistent style. For example, use the same font and size for annotations across all final figures, and place experiment identifiers in a similar position on each plot.

Choosing Colors, Markers, and Lines

Visual encoding, such as color and marker style, is how you differentiate datasets and model components. In scientific figures, aesthetics must serve clarity and accessibility.

When choosing colors in ROOT:

Prefer simple, high-contrast colors for the main elements, such as black for data points and a single accent color for key models.

Ensure the plot remains understandable if printed in grayscale. This usually means that line style and marker style must also encode differences.

Consider colorblind-friendly choices if you rely heavily on color, for example avoid distinguishing curves only by red and green.

Use line width thick enough to be visible when the figure is reduced in size in a report or presentation.

Marker size should be large enough to distinguish individual points but not so large that they overlap excessively at high densities. You can adjust marker types and sizes to make overlapping datasets readable.

A common convention is:

Data: solid markers with error bars, black or dark color.

Total model: solid line in a strong color, for example red.

Background components: dashed or dotted lines in lighter or varied colors.

When comparing several histograms, such as alternative selections, draw them with different line colors and styles, and consider using open markers or semi-transparent fills to avoid hiding underlying distributions.

Make sure any colors and styles you use are reflected correctly in the legend, by adding each object to the legend after you have configured its appearance.

Exporting High-Quality Files

The final step is to export your ROOT canvases into file formats suitable for reports and presentations. You should save each important figure in at least one raster format for quick viewing and one vector or high-resolution format for publication.

ROOT canvases can be saved programmatically from TCanvas with commands such as:

canvas->SaveAs("figure_name.pdf");

canvas->SaveAs("figure_name.png");

canvas->SaveAs("figure_name.root");

In your final project, you should:

Save each publication-quality figure with a descriptive file name that reflects its content, for example mass_peak_fit.pdf or efficiency_vs_energy.png, not generic names.

Use PDF or SVG for figures that will go into a report, thesis, or paper. These vector formats scale cleanly and preserve text sharpness.

Use PNG at sufficiently high resolution for presentations or quick checks. You can control canvas size before drawing to get adequate pixel dimensions.

Store the ROOT canvas in a .root file for reproducibility. This allows you or someone else to reopen the canvas, inspect objects, adjust styling, and export again if needed.

Always export your key figures in a vector format (PDF or SVG) and keep the corresponding ROOT canvases so you can regenerate them if the style or layout needs updates.

If you later modify your analysis or discover a problem, you should not manually edit the image files themselves. Instead, update your analysis or plotting macro, regenerate the canvas, and save new versions of the figure. This keeps your workflow honest and traceable.

Integrating Figures into Your Report

Your figures and your written report must tell a coherent story. In the final project, every figure you classify as publication quality should appear in the report with:

A caption that explains what is shown, without requiring the reader to search in the main text.

A reference in the text that discusses the main features of the figure and explains their relevance.

Consistent numbering, for example "Figure 1", "Figure 2", in the order of appearance.

The caption should mention:

The observable and units.

The dataset or selection used.

Any fit or model shown and its basic properties.

Any special features, such as log scale or restricted range.

For example, a caption might state: "Distribution of the reconstructed invariant mass $m_{\gamma\gamma}$ [GeV] for selected events after all analysis cuts. Data points with statistical uncertainties are compared to a Gaussian plus linear background fit. The vertical dashed lines indicate the signal region used for yield extraction."

Make sure that the figure file you insert into the report is the same one produced by your ROOT analysis. Do not reformat or crop it in ways that change relative scales or remove critical information, such as legends or labels. If a different layout is needed, adjust your ROOT plotting code accordingly and regenerate the figure.

By treating your ROOT plots as part of your analysis code, with clear styling, correct uncertainties, informative labeling, and high-quality export, you will produce figures that are suitable for scientific communication and that accurately represent your final project results.

Views: 12

Comments

Please login to add a comment.

Don't have an account? Register now!