Menu

Guide12 min read

Lab Data Plotting Guide: From Measurements to Publication Figures

By Francesco Villasmunta
Lab Data Plotting Guide: From Measurements to Publication Figures

You have a spreadsheet of lab measurements. Now what? Whether it is time-series drug release data, enzyme kinetics, or group comparisons, turning raw numbers into clean, publication-quality figures requires a consistent workflow.

This guide walks you through choosing the right plot type, adding error bars correctly, fitting models, and exporting - all with interactive Python code you can modify and run.

What You Will Learn

0.Live Code Lab: Lab Data Workflow

1.Common Lab Data Types

2.6-Step Plotting Workflow

3.Error Bars: SD vs SEM vs CI

4.Curve Fitting Models

5.Live Code: Curve Fitting

6.Common Mistakes

0. Live Code Lab: Lab Data Workflow

A complete lab data workflow: simulate replicate measurements, calculate SEM, and plot means with error bars across multiple conditions. Edit the code to use your own data.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • Colors: Modify color values to see different palettes
  • Numbers: Adjust sizes, positions, or data ranges
  • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

1. Common Lab Data Types

Time-Series

Drug release kinetics, growth curves, degradation. Plot: line + error bars.

Dose-Response

IC50, EC50 curves. Plot: scatter + 4-parameter logistic fit.

Spectroscopic

UV-Vis, FTIR, NMR, fluorescence spectra. Plot: line or stacked spectra.

Group Comparisons

Control vs treatment. Plot: bar + individual points, or violin/box.

Correlation

Calibration curves, two-variable relationships. Plot: scatter + regression.

Categorical Counts

Cell type frequencies, colony counts. Plot: grouped bar or stacked bar.

2. 6-Step Plotting Workflow

1.

Prepare your CSV

One column per variable, one row per measurement. Include a 'condition' or 'group' column. Clean headers with no spaces.

2.

Upload to Plotivy (or load in Python)

Drag your CSV into the analyze page. The data preview confirms correct parsing.

3.

Choose the right plot type

Bar chart for group comparisons, line for time-series, scatter for correlations. Check section 1 above.

4.

Add error bars

Always show variability. Use SEM for comparing means or SD for describing spread. See section 3 below.

5.

Fit a model if needed

Linear regression, exponential decay, or Michaelis-Menten. Report the fitted equation and R-squared.

6.

Export at publication quality

Use PDF for line art, PNG at 600 DPI for photos. Set correct figure width for your target journal.

3. Error Bars: SD vs SEM vs CI

Choosing the wrong error bar type is one of the most common mistakes in published figures. Here is when to use each:

TypeShowsUse WhenFormula
SDData spreadDescribing variability of individual measurementssqrt(sum((x-mean)^2)/(n-1))
SEMPrecision of meanComparing means between groupsSD / sqrt(n)
95% CIConfidence rangeStatistical inference - if CIs do not overlap, likely significantmean +/- 1.96 * SEM

Key Rule

Always state which error bar type you used in the figure caption. A figure with error bars but no caption explaining whether they are SD, SEM, or CI is incomplete and will likely be flagged by reviewers.

4. Curve Fitting Models

Linear

y = mx + b

Calibration curves, Beer-Lambert, standard curves

Exponential Decay

y = A*e^(-kx) + C

Drug clearance, radioactive decay, fluorescence lifetime

Michaelis-Menten

v = Vmax*[S]/(Km+[S])

Enzyme kinetics, receptor binding

4-Parameter Logistic

y = D+(A-D)/(1+(x/C)^B)

Dose-response (IC50/EC50), ELISA standard curves

5. Live Code: Three Curve Fits

Three common lab curve fits side by side: linear calibration, exponential decay, and Michaelis-Menten enzyme kinetics. Each panel shows the fitted model equation and key parameters.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • Colors: Modify color values to see different palettes
  • Numbers: Adjust sizes, positions, or data ranges
  • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

6. Common Mistakes

No error bars on bar charts

Fix: Always show variability. Use SEM for comparing means, SD for describing spread.

Using SD with n=3

Fix: With very small n, SD is unreliable. Consider showing all individual data points instead.

Not stating which error bar type

Fix: Every figure caption must say 'error bars represent SEM (n=5)' or similar.

Fitting the wrong model

Fix: Choose the model based on the underlying biology/chemistry, not just R-squared value.

Extrapolating beyond measured range

Fix: Only plot the fitted curve within your data range unless there is theoretical justification.

Chart gallery

Lab-ready chart templates

Start from these gallery templates - each is designed for typical lab data scenarios.

Browse all chart types →
Line graph with error bars showing 95% confidence intervals
Statisticalmatplotlib
From the chart galleryScientific data presentation

Error Bars

Graphical representations of the variability of data indicating error or uncertainty in measurements.

Sample code / prompt

import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

# Generate bacterial growth data with replicates
np.random.seed(42)
time_points = np.array([0, 4, 8, 12, 18, 24])
mean_values = np.array([10, 25, 80, 250, 600, 800])

# Generate 5 replicates per time point with noise
Scatter plot of height vs weight colored by gender with regression line
Statisticalmatplotlib, seaborn
From the chart galleryCorrelation analysis between metrics

Scatterplot

Displays values for two variables as points on a Cartesian coordinate system.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
import pandas as pd

# Generate sample data
np.random.seed(42)
n_samples = 200
height = np.random.normal(170, 8, n_samples)
weight = height * 0.6 + np.random.normal(0, 8, n_samples) - 50
Bar chart comparing average scores across 5 groups with error bars
Comparisonmatplotlib, seaborn
From the chart galleryComparing performance across categories

Bar Chart

Compares categorical data using rectangular bars with heights proportional to values.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate performance scores for 5 treatment groups
np.random.seed(42)
groups = ['Control', 'Treatment A', 'Treatment B', 'Treatment C', 'Treatment D']
n_samples = 30
Multi-line graph showing temperature trends for 3 cities over a year
Time Seriesmatplotlib, seaborn
From the chart galleryStock price tracking over time

Line Graph

Displays data points connected by straight line segments to show trends over time.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np

# Generate temperature data for 3 major US cities over 12 months
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
nyc = [30, 32, 40, 52, 65, 75, 82, 81, 74, 63, 50, 38]
miami = [65, 66, 70, 76, 82, 87, 90, 90, 87, 80, 72, 66]
chicago = [25, 27, 35, 48, 62, 72, 80, 79, 71, 60, 45, 32]

# Create figure with enhanced styling
Box and whisker plot comparing gene expression across 4 genotypes with significance brackets
Distributionseaborn, matplotlib
From the chart galleryComparing experimental groups in scientific research

Box and Whisker Plot

Displays data distribution using quartiles, median, and outliers in a standardized format.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate gene expression data for 4 genotypes
np.random.seed(42)
genotypes = ['WT', 'KO1', 'KO2', 'Mutant']
n_per_group = 20

From Lab Bench to Publication

Upload your CSV, describe what you need, and Plotivy generates publication-quality figures with proper error bars and curve fits automatically.

Start Free
Tags:#lab data plotting#lab measurements#scientific data app#experimental data#error bars#curve fitting

Found this helpful? Share it with your network.

FV
Francesco Villasmunta

Experimental Physicist & Photonics Researcher

Hands-on experience in silicon photonics, semiconductor fabrication (DRIE/ICP-RIE), optical simulation, and data-driven analysis. Built Plotivy to help researchers focus on discoveries instead of data struggles.

More about the author

Visualize your own data

Apply the techniques from this article to your own datasets. Upload CSV, Excel, or paste data directly.

Start Analyzing - Free