Menu

Materials Science Visualization

XRD Pattern Generator

Generate publication-ready XRD pattern plots from your diffraction data. Annotate peaks, set formatting for Nature/ACS, and export high-res figures instantly.

The Pain of XRD Plotting

  • ×Matplotlib defaults are not journal-ready. Default styling requires hours of manual tweaking for every plot.
  • ×Manual annotation is tedious. Labeling multiple peaks consistently across samples takes forever in Illustrator.
  • ×Reproducibility is hard. Recreating a figure from 6 months ago without the original code is often impossible.

How Plotivy Solves It

Upload your CSV (2theta, intensity), describe the formatting, and get a finished figure with Python code in seconds.

> "Plot XRD pattern for copper sample. Label peaks at 43.3°, 50.5°, 74.1° with Miller indices. Use Nature Materials style."

Live Code Lab: XRD Pattern

This Python code generates a correctly formatted XRD pattern. It includes peak annotations and journal-specific sizing. Edit and run to see changes instantly.

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.

Why Materials Scientists Use Plotivy

Journal Presets

One-click formatting for Nature (88mm), Science, and ACS. No more manual resizing.

Full Python Code

Get the Matplotlib code with every figure. totally reproducible and editable.

Miller Indices Support

Easy support for special characters and subscripts in peak labels.

Multi-Pattern Stacking

Easily plot multiple patterns with vertical offsets for phase comparison.

Chart gallery

Related Visualizations

Explore more tools for materials science

Browse all chart types →
Correlation heatmap with diverging color scale and coefficient annotations
Statistical•seaborn, matplotlib
From the chart gallery•Correlation analysis between variables

Heatmap

Represents data values as colors in a two-dimensional matrix format.

Sample code / prompt

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

# Create correlation matrix for financial metrics
metrics = ['Revenue', 'Profit', 'Expenses', 'ROI', 'Customers', 'AOV', 'Marketing', 'Employees']
correlation_data = np.array([
    [1.00, 0.85, -0.45, 0.72, 0.88, 0.65, 0.72, 0.55],
    [0.85, 1.00, -0.78, 0.92, 0.75, 0.58, 0.63, 0.48],
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))

Ready to Plot Your XRD Data?

Upload your CSV and get a publication-ready figure with Python code in seconds.