pymatviz


Namepymatviz JSON
Version 0.8.1 PyPI version JSON
download
home_page
SummaryA toolkit for visualizations in materials informatics
upload_time2024-02-11 17:37:06
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2021 Janosh Riebesell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
keywords chemistry data visualization materials discovery materials informatics matplotlib plotly science
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
<img src="https://github.com/janosh/pymatviz/raw/main/site/static/favicon.svg" alt="Logo" height="60px">
<br class="hide-in-docs">
pymatviz
</h1>

<h4 align="center" class="toc-exclude">

A toolkit for visualizations in materials informatics.

[![Tests](https://github.com/janosh/pymatviz/actions/workflows/test.yml/badge.svg)](https://github.com/janosh/pymatviz/actions/workflows/test.yml)
[![This project supports Python 3.9+](https://img.shields.io/badge/Python-3.9+-blue.svg?logo=python&logoColor=white)](https://python.org/downloads)
[![PyPI](https://img.shields.io/pypi/v/pymatviz?logo=pypi&logoColor=white)](https://pypi.org/project/pymatviz)
[![PyPI Downloads](https://img.shields.io/pypi/dm/pymatviz?logo=icloud&logoColor=white)](https://pypistats.org/packages/pymatviz)
[![Zenodo](https://img.shields.io/badge/DOI-10.5281/zenodo.10456384-blue?logo=Zenodo&logoColor=white)](https://zenodo.org/records/10456384)

</h4>

<slot name="how-to-cite">

> If you use `pymatviz` in your research, [see how to cite](#--how-to-cite-pymatviz).

</slot>

## 🔨 &thinsp; Installation

```sh
pip install pymatviz
```

## 💡 &thinsp; API Docs

See the [/api] page.

[/api]: https://janosh.github.io/pymatviz/api

## 📙 &thinsp; Usage

See the Jupyter notebooks under [`examples/`](examples) for how to use `pymatviz`. PRs with additional examples are welcome! 🙏

|                                                                                                                        |                                                                                                                                       |                                      |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| [matbench_dielectric_eda.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/matbench_dielectric_eda.ipynb)   | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/matbench_dielectric_eda.ipynb)  | [![Launch Codespace]][codespace url] |
| [mp_bimodal_e_form.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/mp_bimodal_e_form.ipynb)               | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/mp_bimodal_e_form.ipynb)        | [![Launch Codespace]][codespace url] |
| [matbench_perovskites_eda.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/matbench_perovskites_eda.ipynb) | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/matbench_perovskites_eda.ipynb) | [![Launch Codespace]][codespace url] |
| [mprester_ptable.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb)                   | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb)          | [![Launch Codespace]][codespace url] |

[Open in Google Colab]: https://colab.research.google.com/assets/colab-badge.svg
[Launch Codespace]: https://img.shields.io/badge/Launch-Codespace-darkblue?logo=github
[codespace url]: https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=340898532

## Periodic Table

See [`pymatviz/ptable.py`](pymatviz/ptable.py). Heatmaps of the periodic table can be plotted both with `matplotlib` and `plotly`. `plotly` supports displaying additional data on hover or full interactivity through [Dash](https://plotly.com/dash).

| [`ptable_heatmap(compositions, log=True)`](pymatviz/ptable.py) |    [`ptable_heatmap_ratio(comps_a, comps_b)`](pymatviz/ptable.py)     |
| :------------------------------------------------------------: | :-------------------------------------------------------------------: |
|                       ![ptable-heatmap]                        |                        ![ptable-heatmap-ratio]                        |
|  [`ptable_heatmap_plotly(atomic_masses)`](pymatviz/ptable.py)  | [`ptable_heatmap_plotly(compositions, log=True)`](pymatviz/ptable.py) |
|            ![ptable-heatmap-plotly-more-hover-data]            |                     ![ptable-heatmap-plotly-log]                      |

## Nested Periodic Table

See [`pymatviz/ptable.py`](pymatviz/ptable.py). Plot histogram plots and scatter plots nested within periodic table.
| [`ptable_hists(data, colormap="coolwarm"`](pymatviz/ptable.py) | [`ptable_scatters(data, colormap="coolwarm"`](pymatviz/ptable.py) |
| :------------------------------------------------------------: | :---------------------------------------------------------------: |

<!-- prettier-ignore -->
|                        ![ptable-hists]                         |                        ![ptable-scatters]                         |

[ptable-hists]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-hists.svg
[ptable-scatters]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-scatters.svg

## Phonons

See [`pymatviz/phonons.py`](pymatviz/phonons.py).

|           [`plot_phonon_bands(bands_dict)`](pymatviz/phonons.py)           | [`plot_phonon_dos(doses_dict)`](pymatviz/phonons.py) |
| :------------------------------------------------------------------------: | :--------------------------------------------------: |
|                              ![phonon-bands]                               |                    ![phonon-dos]                     |
| [`plot_phonon_bands_and_dos(bands_dict, doses_dict)`](pymatviz/phonons.py) |                                                      |
|                          ![phonon-bands-and-dos]                           |                                                      |

[phonon-bands]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-bands-mp-2758.svg
[phonon-dos]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-dos-mp-2758.svg
[phonon-bands-and-dos]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-bands-and-dos-mp-2758.svg

### Dash app using `ptable_heatmap_plotly()`

See [`examples/mprester_ptable.ipynb`](https://github.com/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb).

<https://user-images.githubusercontent.com/30958850/181644052-b330f0a2-70fc-451c-8230-20d45d3af72f.mp4>

## Sunburst

See [`pymatviz/sunburst.py`](pymatviz/sunburst.py).

| [`spacegroup_sunburst([65, 134, 225, ...])`](pymatviz/sunburst.py) | [`spacegroup_sunburst(["C2/m", "P-43m", "Fm-3m", ...])`](pymatviz/sunburst.py) |
| :----------------------------------------------------------------: | :----------------------------------------------------------------------------: |
|                        ![spg-num-sunburst]                         |                             ![spg-symbol-sunburst]                             |

## Sankey

See [`pymatviz/sankey.py`](pymatviz/sankey.py).

| [`sankey_from_2_df_cols(df_perovskites)`](pymatviz/sankey.py) | [`sankey_from_2_df_cols(df_rand_ints)`](pymatviz/sankey.py) |
| :-----------------------------------------------------------: | :---------------------------------------------------------: |
|             ![sankey-spglib-vs-aflow-spacegroups]             |              ![sankey-from-2-df-cols-randints]              |

## Structure

See [`pymatviz/structure_viz.py`](pymatviz/structure_viz.py). Currently structure plotting is only supported with `matplotlib` in 2d. 3d interactive plots (probably with `plotly`) are on the road map.

| [`plot_structure_2d(mp_19017)`](pymatviz/structure_viz.py) | [`plot_structure_2d(mp_12712)`](pymatviz/structure_viz.py) |
| :--------------------------------------------------------: | :--------------------------------------------------------: |
|  ![struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered]   |        ![struct-2d-mp-12712-Hf9Zr9Pd24-disordered]         |

![matbench-phonons-structures-2d]

## Histograms

See [`pymatviz/histograms.py`](pymatviz/histograms.py).

| [`spacegroup_hist([65, 134, 225, ...], backend="matplotlib")`](pymatviz/histograms.py) | [`spacegroup_hist(["C2/m", "P-43m", "Fm-3m", ...], backend="matplotlib")`](pymatviz/histograms.py) |
| :------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------: |
|                               ![spg-num-hist-matplotlib]                               |                                   ![spg-symbol-hist-matplotlib]                                    |
|   [`spacegroup_hist([65, 134, 225, ...], backend="plotly")`](pymatviz/histograms.py)   |   [`spacegroup_hist(["C2/m", "P-43m", "Fm-3m", ...], backend="plotly")`](pymatviz/histograms.py)   |
|                                 ![spg-num-hist-plotly]                                 |                                     ![spg-symbol-hist-plotly]                                      |
|   [`elements_hist(compositions, log=True, bar_values='count')`](pymatviz/ptable.py)    |                                                                                                    |
|                                    ![elements-hist]                                    |                                                                                                    |

[spg-symbol-hist-plotly]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-hist-plotly.svg
[spg-num-hist-plotly]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-hist-plotly.svg
[spg-num-hist-matplotlib]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-hist-matplotlib.svg
[spg-symbol-hist-matplotlib]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-hist-matplotlib.svg

## Parity Plots

See [`pymatviz/parity.py`](pymatviz/parity.py).

|      [`density_scatter(xs, ys, ...)`](pymatviz/parity.py)       | [`density_scatter_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |
| :-------------------------------------------------------------: | :-------------------------------------------------------------: |
|                       ![density-scatter]                        |                  ![density-scatter-with-hist]                   |
|       [`density_hexbin(xs, ys, ...)`](pymatviz/parity.py)       |  [`density_hexbin_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |
|                        ![density-hexbin]                        |                   ![density-hexbin-with-hist]                   |
| [`scatter_with_err_bar(xs, ys, yerr, ...)`](pymatviz/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](pymatviz/parity.py) |
|                     ![scatter-with-err-bar]                     |                      ![residual-vs-actual]                      |

## Uncertainty Calibration

See [`pymatviz/uncertainty.py`](pymatviz/uncertainty.py).

|       [`qq_gaussian(y_true, y_pred, y_std)`](pymatviz/uncertainty.py)       |       [`qq_gaussian(y_true, y_pred, y_std: dict)`](pymatviz/uncertainty.py)       |
| :-------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |
|                             ![normal-prob-plot]                             |                           ![normal-prob-plot-multiple]                            |
| [`error_decay_with_uncert(y_true, y_pred, y_std)`](pymatviz/uncertainty.py) | [`error_decay_with_uncert(y_true, y_pred, y_std: dict)`](pymatviz/uncertainty.py) |
|                         ![error-decay-with-uncert]                          |                        ![error-decay-with-uncert-multiple]                        |

## Cumulative Error & Residual

See [`pymatviz/cumulative.py`](pymatviz/cumulative.py).

| [`cumulative_error(preds, targets)`](pymatviz/cumulative.py) | [`cumulative_residual(preds, targets)`](pymatviz/cumulative.py) |
| :----------------------------------------------------------: | :-------------------------------------------------------------: |
|                     ![cumulative-error]                      |                     ![cumulative-residual]                      |

## Classification Metrics

See [`pymatviz/relevance.py`](pymatviz/relevance.py).

| [`roc_curve(targets, proba_pos)`](pymatviz/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](pymatviz/relevance.py) |
| :------------------------------------------------------: | :-------------------------------------------------------------------: |
|                       ![roc-curve]                       |                       ![precision-recall-curve]                       |

## Correlation

See [`pymatviz/correlation.py`](pymatviz/correlation.py).

| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](pymatviz/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](pymatviz/correlation.py) |
| :------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
|                            ![marchenko-pastur]                             |                            ![marchenko-pastur-significant-eval]                             |

[cumulative-error]: https://github.com/janosh/pymatviz/raw/main/assets/cumulative-error.svg
[cumulative-residual]: https://github.com/janosh/pymatviz/raw/main/assets/cumulative-residual.svg
[density-hexbin-with-hist]: https://github.com/janosh/pymatviz/raw/main/assets/density-hexbin-with-hist.svg
[density-hexbin]: https://github.com/janosh/pymatviz/raw/main/assets/density-hexbin.svg
[density-scatter-with-hist]: https://github.com/janosh/pymatviz/raw/main/assets/density-scatter-with-hist.svg
[density-scatter]: https://github.com/janosh/pymatviz/raw/main/assets/density-scatter.svg
[error-decay-with-uncert-multiple]: https://github.com/janosh/pymatviz/raw/main/assets/error-decay-with-uncert-multiple.svg
[error-decay-with-uncert]: https://github.com/janosh/pymatviz/raw/main/assets/error-decay-with-uncert.svg
[elements-hist]: https://github.com/janosh/pymatviz/raw/main/assets/elements-hist.svg
[marchenko-pastur-significant-eval]: https://github.com/janosh/pymatviz/raw/main/assets/marchenko-pastur-significant-eval.svg
[marchenko-pastur]: https://github.com/janosh/pymatviz/raw/main/assets/marchenko-pastur.svg
[matbench-phonons-structures-2d]: https://github.com/janosh/pymatviz/raw/main/assets/matbench-phonons-structures-2d.svg
[normal-prob-plot-multiple]: https://github.com/janosh/pymatviz/raw/main/assets/normal-prob-plot-multiple.svg
[normal-prob-plot]: https://github.com/janosh/pymatviz/raw/main/assets/normal-prob-plot.svg
[precision-recall-curve]: https://github.com/janosh/pymatviz/raw/main/assets/precision-recall-curve.svg
[ptable-heatmap-plotly-log]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-plotly-log.svg
[ptable-heatmap-plotly-more-hover-data]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-plotly-more-hover-data.svg
[ptable-heatmap-ratio]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-ratio.svg
[ptable-heatmap]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap.svg
[residual-vs-actual]: https://github.com/janosh/pymatviz/raw/main/assets/residual-vs-actual.svg
[roc-curve]: https://github.com/janosh/pymatviz/raw/main/assets/roc-curve.svg
[sankey-from-2-df-cols-randints]: https://github.com/janosh/pymatviz/raw/main/assets/sankey-from-2-df-cols-randints.svg
[sankey-spglib-vs-aflow-spacegroups]: https://github.com/janosh/pymatviz/raw/main/assets/sankey-spglib-vs-aflow-spacegroups.svg
[scatter-with-err-bar]: https://github.com/janosh/pymatviz/raw/main/assets/scatter-with-err-bar.svg
[spg-num-sunburst]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-sunburst.svg
[spg-symbol-sunburst]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-sunburst.svg
[struct-2d-mp-12712-Hf9Zr9Pd24-disordered]: https://github.com/janosh/pymatviz/raw/main/assets/struct-2d-mp-12712-Hf9Zr9Pd24-disordered.svg
[struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered]: https://github.com/janosh/pymatviz/raw/main/assets/struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered.svg

## 📖 &thinsp; How to cite `pymatviz`

You can cite the [Zenodo record](https://zenodo.org/badge/latestdoi/340898532) using the following BibTeX entry:

```bib
@software{riebesell_pymatviz_2022,
  title = {Pymatviz: visualization toolkit for materials informatics},
  author = {Riebesell, Janosh},
  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.7.1}, % replace with the version you use
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pymatviz",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "chemistry,data visualization,materials discovery,materials informatics,matplotlib,plotly,science",
    "author": "",
    "author_email": "Janosh Riebesell <janosh.riebesell@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bc/fb/9e47f25899f07ceeb66ccfd62955aba81fa415222c2c9ed581b0ac788537/pymatviz-0.8.1.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n<img src=\"https://github.com/janosh/pymatviz/raw/main/site/static/favicon.svg\" alt=\"Logo\" height=\"60px\">\n<br class=\"hide-in-docs\">\npymatviz\n</h1>\n\n<h4 align=\"center\" class=\"toc-exclude\">\n\nA toolkit for visualizations in materials informatics.\n\n[![Tests](https://github.com/janosh/pymatviz/actions/workflows/test.yml/badge.svg)](https://github.com/janosh/pymatviz/actions/workflows/test.yml)\n[![This project supports Python 3.9+](https://img.shields.io/badge/Python-3.9+-blue.svg?logo=python&logoColor=white)](https://python.org/downloads)\n[![PyPI](https://img.shields.io/pypi/v/pymatviz?logo=pypi&logoColor=white)](https://pypi.org/project/pymatviz)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/pymatviz?logo=icloud&logoColor=white)](https://pypistats.org/packages/pymatviz)\n[![Zenodo](https://img.shields.io/badge/DOI-10.5281/zenodo.10456384-blue?logo=Zenodo&logoColor=white)](https://zenodo.org/records/10456384)\n\n</h4>\n\n<slot name=\"how-to-cite\">\n\n> If you use `pymatviz` in your research, [see how to cite](#--how-to-cite-pymatviz).\n\n</slot>\n\n## \ud83d\udd28 &thinsp; Installation\n\n```sh\npip install pymatviz\n```\n\n## \ud83d\udca1 &thinsp; API Docs\n\nSee the [/api] page.\n\n[/api]: https://janosh.github.io/pymatviz/api\n\n## \ud83d\udcd9 &thinsp; Usage\n\nSee the Jupyter notebooks under [`examples/`](examples) for how to use `pymatviz`. PRs with additional examples are welcome! \ud83d\ude4f\n\n|                                                                                                                        |                                                                                                                                       |                                      |\n| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |\n| [matbench_dielectric_eda.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/matbench_dielectric_eda.ipynb)   | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/matbench_dielectric_eda.ipynb)  | [![Launch Codespace]][codespace url] |\n| [mp_bimodal_e_form.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/mp_bimodal_e_form.ipynb)               | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/mp_bimodal_e_form.ipynb)        | [![Launch Codespace]][codespace url] |\n| [matbench_perovskites_eda.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/matbench_perovskites_eda.ipynb) | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/matbench_perovskites_eda.ipynb) | [![Launch Codespace]][codespace url] |\n| [mprester_ptable.ipynb](https://github.com/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb)                   | [![Open in Google Colab]](https://colab.research.google.com/github/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb)          | [![Launch Codespace]][codespace url] |\n\n[Open in Google Colab]: https://colab.research.google.com/assets/colab-badge.svg\n[Launch Codespace]: https://img.shields.io/badge/Launch-Codespace-darkblue?logo=github\n[codespace url]: https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=340898532\n\n## Periodic Table\n\nSee [`pymatviz/ptable.py`](pymatviz/ptable.py). Heatmaps of the periodic table can be plotted both with `matplotlib` and `plotly`. `plotly` supports displaying additional data on hover or full interactivity through [Dash](https://plotly.com/dash).\n\n| [`ptable_heatmap(compositions, log=True)`](pymatviz/ptable.py) |    [`ptable_heatmap_ratio(comps_a, comps_b)`](pymatviz/ptable.py)     |\n| :------------------------------------------------------------: | :-------------------------------------------------------------------: |\n|                       ![ptable-heatmap]                        |                        ![ptable-heatmap-ratio]                        |\n|  [`ptable_heatmap_plotly(atomic_masses)`](pymatviz/ptable.py)  | [`ptable_heatmap_plotly(compositions, log=True)`](pymatviz/ptable.py) |\n|            ![ptable-heatmap-plotly-more-hover-data]            |                     ![ptable-heatmap-plotly-log]                      |\n\n## Nested Periodic Table\n\nSee [`pymatviz/ptable.py`](pymatviz/ptable.py). Plot histogram plots and scatter plots nested within periodic table.\n| [`ptable_hists(data, colormap=\"coolwarm\"`](pymatviz/ptable.py) | [`ptable_scatters(data, colormap=\"coolwarm\"`](pymatviz/ptable.py) |\n| :------------------------------------------------------------: | :---------------------------------------------------------------: |\n\n<!-- prettier-ignore -->\n|                        ![ptable-hists]                         |                        ![ptable-scatters]                         |\n\n[ptable-hists]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-hists.svg\n[ptable-scatters]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-scatters.svg\n\n## Phonons\n\nSee [`pymatviz/phonons.py`](pymatviz/phonons.py).\n\n|           [`plot_phonon_bands(bands_dict)`](pymatviz/phonons.py)           | [`plot_phonon_dos(doses_dict)`](pymatviz/phonons.py) |\n| :------------------------------------------------------------------------: | :--------------------------------------------------: |\n|                              ![phonon-bands]                               |                    ![phonon-dos]                     |\n| [`plot_phonon_bands_and_dos(bands_dict, doses_dict)`](pymatviz/phonons.py) |                                                      |\n|                          ![phonon-bands-and-dos]                           |                                                      |\n\n[phonon-bands]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-bands-mp-2758.svg\n[phonon-dos]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-dos-mp-2758.svg\n[phonon-bands-and-dos]: https://github.com/janosh/pymatviz/raw/main/assets/phonon-bands-and-dos-mp-2758.svg\n\n### Dash app using `ptable_heatmap_plotly()`\n\nSee [`examples/mprester_ptable.ipynb`](https://github.com/janosh/pymatviz/blob/main/examples/mprester_ptable.ipynb).\n\n<https://user-images.githubusercontent.com/30958850/181644052-b330f0a2-70fc-451c-8230-20d45d3af72f.mp4>\n\n## Sunburst\n\nSee [`pymatviz/sunburst.py`](pymatviz/sunburst.py).\n\n| [`spacegroup_sunburst([65, 134, 225, ...])`](pymatviz/sunburst.py) | [`spacegroup_sunburst([\"C2/m\", \"P-43m\", \"Fm-3m\", ...])`](pymatviz/sunburst.py) |\n| :----------------------------------------------------------------: | :----------------------------------------------------------------------------: |\n|                        ![spg-num-sunburst]                         |                             ![spg-symbol-sunburst]                             |\n\n## Sankey\n\nSee [`pymatviz/sankey.py`](pymatviz/sankey.py).\n\n| [`sankey_from_2_df_cols(df_perovskites)`](pymatviz/sankey.py) | [`sankey_from_2_df_cols(df_rand_ints)`](pymatviz/sankey.py) |\n| :-----------------------------------------------------------: | :---------------------------------------------------------: |\n|             ![sankey-spglib-vs-aflow-spacegroups]             |              ![sankey-from-2-df-cols-randints]              |\n\n## Structure\n\nSee [`pymatviz/structure_viz.py`](pymatviz/structure_viz.py). Currently structure plotting is only supported with `matplotlib` in 2d. 3d interactive plots (probably with `plotly`) are on the road map.\n\n| [`plot_structure_2d(mp_19017)`](pymatviz/structure_viz.py) | [`plot_structure_2d(mp_12712)`](pymatviz/structure_viz.py) |\n| :--------------------------------------------------------: | :--------------------------------------------------------: |\n|  ![struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered]   |        ![struct-2d-mp-12712-Hf9Zr9Pd24-disordered]         |\n\n![matbench-phonons-structures-2d]\n\n## Histograms\n\nSee [`pymatviz/histograms.py`](pymatviz/histograms.py).\n\n| [`spacegroup_hist([65, 134, 225, ...], backend=\"matplotlib\")`](pymatviz/histograms.py) | [`spacegroup_hist([\"C2/m\", \"P-43m\", \"Fm-3m\", ...], backend=\"matplotlib\")`](pymatviz/histograms.py) |\n| :------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------: |\n|                               ![spg-num-hist-matplotlib]                               |                                   ![spg-symbol-hist-matplotlib]                                    |\n|   [`spacegroup_hist([65, 134, 225, ...], backend=\"plotly\")`](pymatviz/histograms.py)   |   [`spacegroup_hist([\"C2/m\", \"P-43m\", \"Fm-3m\", ...], backend=\"plotly\")`](pymatviz/histograms.py)   |\n|                                 ![spg-num-hist-plotly]                                 |                                     ![spg-symbol-hist-plotly]                                      |\n|   [`elements_hist(compositions, log=True, bar_values='count')`](pymatviz/ptable.py)    |                                                                                                    |\n|                                    ![elements-hist]                                    |                                                                                                    |\n\n[spg-symbol-hist-plotly]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-hist-plotly.svg\n[spg-num-hist-plotly]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-hist-plotly.svg\n[spg-num-hist-matplotlib]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-hist-matplotlib.svg\n[spg-symbol-hist-matplotlib]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-hist-matplotlib.svg\n\n## Parity Plots\n\nSee [`pymatviz/parity.py`](pymatviz/parity.py).\n\n|      [`density_scatter(xs, ys, ...)`](pymatviz/parity.py)       | [`density_scatter_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |\n| :-------------------------------------------------------------: | :-------------------------------------------------------------: |\n|                       ![density-scatter]                        |                  ![density-scatter-with-hist]                   |\n|       [`density_hexbin(xs, ys, ...)`](pymatviz/parity.py)       |  [`density_hexbin_with_hist(xs, ys, ...)`](pymatviz/parity.py)  |\n|                        ![density-hexbin]                        |                   ![density-hexbin-with-hist]                   |\n| [`scatter_with_err_bar(xs, ys, yerr, ...)`](pymatviz/parity.py) | [`residual_vs_actual(y_true, y_pred, ...)`](pymatviz/parity.py) |\n|                     ![scatter-with-err-bar]                     |                      ![residual-vs-actual]                      |\n\n## Uncertainty Calibration\n\nSee [`pymatviz/uncertainty.py`](pymatviz/uncertainty.py).\n\n|       [`qq_gaussian(y_true, y_pred, y_std)`](pymatviz/uncertainty.py)       |       [`qq_gaussian(y_true, y_pred, y_std: dict)`](pymatviz/uncertainty.py)       |\n| :-------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: |\n|                             ![normal-prob-plot]                             |                           ![normal-prob-plot-multiple]                            |\n| [`error_decay_with_uncert(y_true, y_pred, y_std)`](pymatviz/uncertainty.py) | [`error_decay_with_uncert(y_true, y_pred, y_std: dict)`](pymatviz/uncertainty.py) |\n|                         ![error-decay-with-uncert]                          |                        ![error-decay-with-uncert-multiple]                        |\n\n## Cumulative Error & Residual\n\nSee [`pymatviz/cumulative.py`](pymatviz/cumulative.py).\n\n| [`cumulative_error(preds, targets)`](pymatviz/cumulative.py) | [`cumulative_residual(preds, targets)`](pymatviz/cumulative.py) |\n| :----------------------------------------------------------: | :-------------------------------------------------------------: |\n|                     ![cumulative-error]                      |                     ![cumulative-residual]                      |\n\n## Classification Metrics\n\nSee [`pymatviz/relevance.py`](pymatviz/relevance.py).\n\n| [`roc_curve(targets, proba_pos)`](pymatviz/relevance.py) | [`precision_recall_curve(targets, proba_pos)`](pymatviz/relevance.py) |\n| :------------------------------------------------------: | :-------------------------------------------------------------------: |\n|                       ![roc-curve]                       |                       ![precision-recall-curve]                       |\n\n## Correlation\n\nSee [`pymatviz/correlation.py`](pymatviz/correlation.py).\n\n| [`marchenko_pastur(corr_mat, gamma=ncols/nrows)`](pymatviz/correlation.py) | [`marchenko_pastur(corr_mat_significant_eval, gamma=ncols/nrows)`](pymatviz/correlation.py) |\n| :------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |\n|                            ![marchenko-pastur]                             |                            ![marchenko-pastur-significant-eval]                             |\n\n[cumulative-error]: https://github.com/janosh/pymatviz/raw/main/assets/cumulative-error.svg\n[cumulative-residual]: https://github.com/janosh/pymatviz/raw/main/assets/cumulative-residual.svg\n[density-hexbin-with-hist]: https://github.com/janosh/pymatviz/raw/main/assets/density-hexbin-with-hist.svg\n[density-hexbin]: https://github.com/janosh/pymatviz/raw/main/assets/density-hexbin.svg\n[density-scatter-with-hist]: https://github.com/janosh/pymatviz/raw/main/assets/density-scatter-with-hist.svg\n[density-scatter]: https://github.com/janosh/pymatviz/raw/main/assets/density-scatter.svg\n[error-decay-with-uncert-multiple]: https://github.com/janosh/pymatviz/raw/main/assets/error-decay-with-uncert-multiple.svg\n[error-decay-with-uncert]: https://github.com/janosh/pymatviz/raw/main/assets/error-decay-with-uncert.svg\n[elements-hist]: https://github.com/janosh/pymatviz/raw/main/assets/elements-hist.svg\n[marchenko-pastur-significant-eval]: https://github.com/janosh/pymatviz/raw/main/assets/marchenko-pastur-significant-eval.svg\n[marchenko-pastur]: https://github.com/janosh/pymatviz/raw/main/assets/marchenko-pastur.svg\n[matbench-phonons-structures-2d]: https://github.com/janosh/pymatviz/raw/main/assets/matbench-phonons-structures-2d.svg\n[normal-prob-plot-multiple]: https://github.com/janosh/pymatviz/raw/main/assets/normal-prob-plot-multiple.svg\n[normal-prob-plot]: https://github.com/janosh/pymatviz/raw/main/assets/normal-prob-plot.svg\n[precision-recall-curve]: https://github.com/janosh/pymatviz/raw/main/assets/precision-recall-curve.svg\n[ptable-heatmap-plotly-log]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-plotly-log.svg\n[ptable-heatmap-plotly-more-hover-data]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-plotly-more-hover-data.svg\n[ptable-heatmap-ratio]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap-ratio.svg\n[ptable-heatmap]: https://github.com/janosh/pymatviz/raw/main/assets/ptable-heatmap.svg\n[residual-vs-actual]: https://github.com/janosh/pymatviz/raw/main/assets/residual-vs-actual.svg\n[roc-curve]: https://github.com/janosh/pymatviz/raw/main/assets/roc-curve.svg\n[sankey-from-2-df-cols-randints]: https://github.com/janosh/pymatviz/raw/main/assets/sankey-from-2-df-cols-randints.svg\n[sankey-spglib-vs-aflow-spacegroups]: https://github.com/janosh/pymatviz/raw/main/assets/sankey-spglib-vs-aflow-spacegroups.svg\n[scatter-with-err-bar]: https://github.com/janosh/pymatviz/raw/main/assets/scatter-with-err-bar.svg\n[spg-num-sunburst]: https://github.com/janosh/pymatviz/raw/main/assets/spg-num-sunburst.svg\n[spg-symbol-sunburst]: https://github.com/janosh/pymatviz/raw/main/assets/spg-symbol-sunburst.svg\n[struct-2d-mp-12712-Hf9Zr9Pd24-disordered]: https://github.com/janosh/pymatviz/raw/main/assets/struct-2d-mp-12712-Hf9Zr9Pd24-disordered.svg\n[struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered]: https://github.com/janosh/pymatviz/raw/main/assets/struct-2d-mp-19017-Li4Mn0.8Fe1.6P4C1.6O16-disordered.svg\n\n## \ud83d\udcd6 &thinsp; How to cite `pymatviz`\n\nYou can cite the [Zenodo record](https://zenodo.org/badge/latestdoi/340898532) using the following BibTeX entry:\n\n```bib\n@software{riebesell_pymatviz_2022,\n  title = {Pymatviz: visualization toolkit for materials informatics},\n  author = {Riebesell, Janosh},\n  date = {2022-10-01},\n  year = {2022},\n  doi = {10.5281/zenodo.7486816},\n  url = {https://github.com/janosh/pymatviz},\n  note = {10.5281/zenodo.7486816 - https://github.com/janosh/pymatviz},\n  urldate = {2023-01-01}, % optional, replace with your date of access\n  version = {0.7.1}, % replace with the version you use\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 Janosh Riebesell  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  The software is provided \"as is\", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. ",
    "summary": "A toolkit for visualizations in materials informatics",
    "version": "0.8.1",
    "project_urls": {
        "Homepage": "https://github.com/janosh/pymatviz"
    },
    "split_keywords": [
        "chemistry",
        "data visualization",
        "materials discovery",
        "materials informatics",
        "matplotlib",
        "plotly",
        "science"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a480d2d2146ca7add65d6c99800dc1f3cbe6ac567d4d830addacc5fc484a696d",
                "md5": "16b537e8ed963ec3b6dbec2e7f090ec8",
                "sha256": "5b3a41dcc0581b5606e9145faefa572eb35797d63db11db850ffb02990dc4b3c"
            },
            "downloads": -1,
            "filename": "pymatviz-0.8.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16b537e8ed963ec3b6dbec2e7f090ec8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.9",
            "size": 70894,
            "upload_time": "2024-02-11T17:37:04",
            "upload_time_iso_8601": "2024-02-11T17:37:04.257927Z",
            "url": "https://files.pythonhosted.org/packages/a4/80/d2d2146ca7add65d6c99800dc1f3cbe6ac567d4d830addacc5fc484a696d/pymatviz-0.8.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcfb9e47f25899f07ceeb66ccfd62955aba81fa415222c2c9ed581b0ac788537",
                "md5": "450c01782631a1b4289ef4fe58ef1857",
                "sha256": "73479c5e5151c54682ceed483a376797160b7041a335e412450af2ccf1e4b815"
            },
            "downloads": -1,
            "filename": "pymatviz-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "450c01782631a1b4289ef4fe58ef1857",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 89093,
            "upload_time": "2024-02-11T17:37:06",
            "upload_time_iso_8601": "2024-02-11T17:37:06.376472Z",
            "url": "https://files.pythonhosted.org/packages/bc/fb/9e47f25899f07ceeb66ccfd62955aba81fa415222c2c9ed581b0ac788537/pymatviz-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-11 17:37:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "janosh",
    "github_project": "pymatviz",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pymatviz"
}
        
Elapsed time: 0.18188s