pymatviz
A toolkit for visualizations in materials informatics.
If you use pymatviz
in your research, see how to cite.
Installation
pip install pymatviz
API Docs
See the /api page.
Usage
See the Jupyter notebooks under examples/
for how to use pymatviz
. PRs with additional examples are welcome! 🙏
Periodic Table
See pymatviz/ptable/ptable_matplotlib.py
and pymatviz/ptable/ptable_plotly.py
. matplotlib
supports heatmaps, heatmap ratios, heatmap splits (multiple values per element), histograms, scatter plots and line plots. plotly
currently only supports heatmaps (PRs to port over other matplotlib
ptable
variants to plotly
are very welcome!). The plotly
heatmap supports displaying additional data on hover or full interactivity through Dash.
Dash app using ptable_heatmap_plotly()
See examples/mprester_ptable.ipynb
.
https://user-images.githubusercontent.com/30958850/181644052-b330f0a2-70fc-451c-8230-20d45d3af72f.mp4
Phonons
See examples/mlff_phonons.ipynb
for usage example.
Structure
See pymatviz/structure_viz/(mpl|plotly).py
. Currently structure plotting is only supported with matplotlib
in 2d. 3d interactive plots (probably with plotly
) are on the road map.
X-Ray Diffraction
See pymatviz/xrd.py
.
Radial Distribution Functions
See pymatviz/rdf/plotly.py
.
Coordination
See pymatviz/coordination/plotly.py
.
Sunburst
See pymatviz/sunburst.py
.
Rainclouds
See pymatviz/rainclouds.py
.
Sankey
See pymatviz/sankey.py
.
Histograms
See pymatviz/histogram.py
.
spacegroup_bar([65, 134, 225, ...], backend="matplotlib") | spacegroup_bar(["C2/m", "P-43m", "Fm-3m", ...], backend="matplotlib") |
---|
| |
spacegroup_bar([65, 134, 225, ...], backend="plotly") | spacegroup_bar(["C2/m", "P-43m", "Fm-3m", ...], backend="plotly") |
| |
elements_hist(compositions, log=True, bar_values='count') | histogram({'key1': values1, 'key2': values2}) |
| |
Scatter Plots
See pymatviz/scatter.py
.
density_scatter_plotly(df, x=x_col, y=y_col, ...) | density_scatter_plotly(df, x=x_col, y=y_col, ...) |
---|
| |
density_scatter(xs, ys, ...) | density_scatter_with_hist(xs, ys, ...) |
| |
density_hexbin(xs, ys, ...) | density_hexbin_with_hist(xs, ys, ...) |
| |
Uncertainty
See pymatviz/uncertainty.py
.
Cumulative Metrics
See pymatviz/cumulative.py
.
Classification
See pymatviz/relevance.py
.
How to cite pymatviz
See citation.cff
or cite the Zenodo record using the following BibTeX entry:
@software{riebesell_pymatviz_2022,
title = {Pymatviz: visualization toolkit for materials informatics},
author = {Riebesell, Janosh and Yang, Haoyu and Goodall, Rhys and Baird, Sterling G.},
date = {2022-10-01},
year = {2022},
doi = {10.5281/zenodo.7486816},
url = {https://github.com/janosh/pymatviz},
note = {10.5281/zenodo.7486816 - https://github.com/janosh/pymatviz},
urldate = {2023-01-01}, % optional, replace with your date of access
version = {0.8.2}, % replace with the version you use
}