Menu

Meta-Analysis and Clinical Reporting

Forest Plot Generator for Hazard Ratios, Odds Ratios, and Meta-Analysis

Forest plots are the fastest way to compare study-level effects and confidence intervals in a single figure. Plotivy turns pooled results, subgroup analyses, and clinical evidence summaries into publication-ready Python output with clear reference lines and consistent weighting.

When a Forest Plot Is the Right Choice

Use a forest plot when you need to compare multiple study estimates against the same clinical question. It is the standard visual format for meta-analysis, odds ratios, hazard ratios, and subgroup effects because it keeps the point estimate, uncertainty interval, and reference threshold in one line.

Meta-analysis

Combine study-level results without hiding the uncertainty interval.

Clinical evidence

Show hazard ratios, odds ratios, and treatment effects side by side.

Subgroup reporting

Compare age bands, biomarkers, or treatment strata in one figure.

Clear decision line

Use the reference line at 1.0 to separate benefit from risk.

What Plotivy Adds to the Workflow

Clean comparison structure

Each study is ordered, labeled, and plotted with a consistent confidence interval scale.

Readable effect sizes

Point estimates remain legible even when the confidence intervals vary widely between studies.

Evidence-oriented layout

Bias toward clarity with a neutral reference line and balanced spacing for manuscript figures.

Reproducible Python output

Every plot is generated as editable code so reviewers and co-authors can trace the exact settings.

Live Code Lab: Forest Plot

This example plots six studies with weighted square markers, confidence intervals, and a vertical reference line at 1.0. Adjust the effect sizes or interval widths to match your own clinical evidence set.

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.

Chart gallery

Related Chart Types

Other chart templates that support clinical and evidence-synthesis workflows

Browse all chart types →
Scatter plot of height vs weight colored by gender with regression line
Statistical•matplotlib, seaborn
From the chart gallery•Correlation 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
Multi-line graph showing temperature trends for 3 cities over a year
Time Series•matplotlib, seaborn
From the chart gallery•Stock 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
Bar chart comparing average scores across 5 groups with error bars
Comparison•matplotlib, seaborn
From the chart gallery•Comparing 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
Histogram showing age distribution with 20 bins and KDE overlay
Distribution•matplotlib, seaborn
From the chart gallery•Analyzing age demographics

Histogram

Displays the distribution of numerical data by grouping values into bins.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import gaussian_kde, skewnorm

# Generate age data with slight right skew
np.random.seed(42)
ages = skewnorm.rvs(a=2, loc=42, scale=15, size=500)
ages = np.clip(ages, 18, 80)  # Clip to realistic range

fig, ax = plt.subplots(figsize=(12, 7))
Violin plot comparing score distributions across 3 groups with inner box plots
Distribution•seaborn, matplotlib
From the chart gallery•Comparing treatment effects across groups

Violin Plot

Combines box plots with kernel density to show distribution shape across groups.

Sample code / prompt

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

# Generate exam score data for 3 groups
np.random.seed(42)
control = np.random.normal(72, 12, 50)
treatment_a = np.random.normal(78, 10, 50)

Turn Study Tables into Clear Evidence Graphics

Build a forest plot from your own effect sizes, keep the uncertainty visible, and export a figure that is ready for a paper, slide deck, or clinical report.