seaborn README

The project's README from github.com/mwaskom/seaborn. As one markdown file: README.md.



seaborn: statistical data visualization

PyPI Version License DOI Tests Code Coverage

Seaborn is a Python visualization library based on matplotlib. It provides a high-level interface for drawing attractive statistical graphics.

Documentation

Online documentation is available at seaborn.pydata.org.

The docs include a tutorial, example gallery, API reference, FAQ, and other useful information.

To build the documentation locally, please refer to doc/README.md.

Dependencies

Seaborn supports Python 3.10+.

Installation requires numpy, pandas, and matplotlib. Some advanced statistical functionality requires scipy and/or statsmodels.

Installation

The latest stable release (and required dependencies) can be installed from PyPI:

uv pip install seaborn

It is also possible to include optional statistical dependencies:

uv pip install seaborn[stats]

Seaborn can also be installed with conda:

conda install seaborn

Note that the main anaconda repository lags PyPI in adding new releases, but conda-forge (-c conda-forge) typically updates quickly.

Citing

A paper describing seaborn has been published in the Journal of Open Source Software. The paper provides an introduction to the key features of the library, and it can be used as a citation if seaborn proves integral to a scientific publication.

Testing

Testing seaborn requires installing additional dependencies; they will be installed when running uv sync with a source checkout.

To test the code, run make test in the source directory. This will exercise the unit tests (using pytest) and generate a coverage report.

Code style is enforced with ruff using the settings in the pyproject.toml file. Run make lint to check. Alternately, you can use pre-commit to automatically run lint checks on any files you are committing: just run pre-commit install to set it up, and then commit as usual going forward.

Development

Seaborn development takes place on Github: https://github.com/mwaskom/seaborn

Please submit bugs that you encounter to the issue tracker with a reproducible example demonstrating the problem. Questions about usage are more at home on StackOverflow, where there is a seaborn tag.

seaborn (mwaskom/seaborn)

Searching Database…

14.1K ·GitHub
这是什么?Seaborn 是一个基于 matplotlib 的 Python 可视化库,提供了高层次的接口,可以方便地画出美观的统计图表。
那它和直接用 matplotlib 有什么区别?它是一个需要导入到你的 Python 代码里的库,构建在 matplotlib 之上:你得到的是一个专注于统计图表的更高层次的 API,不用自己去拼凑绘图的各种细节。
除了这个库本身,还需要安装什么?需要 Python 3.10 或更高版本,以及 numpy、pandas 和 matplotlib。要使用高级统计功能,还需要 scipy 和(或)statsmodels——可以用 uv pip install seaborn[stats] 来安装。
安装之前有什么需要留意的坑吗?如果你走 conda 这条路,anaconda 主仓库的新版本发布通常比 PyPI 慢;conda-forge 频道一般更新得比较快。
安装完之后该从哪里入手?seaborn.pydata.org 上的在线文档包含教程、示例图库、API 参考和常见问题——示例图库是快速了解这个库能画什么的好途径。
它支持我的 pandas DataFrame 吗?支持——pandas 本身就是必需的依赖,所以 seaborn 是围绕 pandas 的数据结构设计的,不需要你先转换自己的数据。
如果我在科研中使用它,有什么可以引用的吗?有——一篇介绍 seaborn 的论文发表在 Journal of Open Source Software 上,README 中建议当 seaborn 在科学论文中起到关键作用时引用该论文。
我可以在商业项目中使用它吗?可以——根据它的 GitHub 元数据,seaborn 采用宽松的 BSD-3-Clause 许可证发布,商业和科研使用都没有问题。
Creator
mwaskom
Size
53.3 MB
Stars
14.1K
Age
14y
Commits · 90 Days