janosh / pymatviz

A toolkit for visualizations in materials informatics.
https://janosh.github.io/pymatviz
MIT License
176 stars 16 forks source link

Vertically/horizontally stacked XRD plots #223

Closed janosh closed 1 month ago

janosh commented 1 month ago
fig = pmv.xrd_pattern(
    {key1: xrd_pattern1, key2: xrd_pattern2 key3: xrd_pattern3},
    stack="horizontal",
    annotate_peaks=3,
    show_angles=True,
)

xrd-pattern-horizontal-stack

fig = pmv.xrd_pattern(
    {f"{key1} {idx=}": structures[key1].copy().perturb(idx * 0.5) for idx in range(3)},
    stack="vertical",
    annotate_peaks=1,
    show_angles=True,
    subtitle_kwargs=dict(x=1, xanchor="right", font_size=14),
)

xrd-pattern-vertical-stack-custom-titles