Scientific plotting package for Cognitive neuroscience
Project description
plotfig
简介
plotfig 是一个专为科学数据可视化设计的 Python 库,
致力于为认知神经科研工作人员提供高效、易用且美观的图形绘制工具。
该项目基于业界主流的可视化库—— matplotlib、surfplot 和 plotly等库开发,
融合了三者的强大功能,能够满足神经科学以及脑连接组学中多种场景下的复杂绘图需求。
项目结构
项目采用模块化设计,核心代码位于 src/plotfig/ 目录下,包含如下主要功能模块:
bar.py:条形图绘制,适用于分组数据的对比展示。matrix.py:通用矩阵可视化,支持多种配色和注释方式。correlation.py:相关性矩阵可视化,便于分析变量间的相关性分布。circos.py:弦图可视化,适合平面展示脑区之间的连接关系。brain_surface.py:脑表面可视化,实现三维脑表面图集结构的绘制。brain_connection.py:玻璃脑连接可视化,支持复杂的脑网络结构展示。
文档与示例
plotfig 提供了网页文档和使用示例。具体参见使用教程。
安装
plotfig 支持通过 pip 或源码安装,要求 Python 3.11 及以上版本。
使用 pip 安装 (推荐)
pip install plotfig
使用 GitHub 源码安装
git clone --depth 1 https://github.com/RicardoRyn/plotfig.git
cd plotfig
pip install .
依赖
plotfig 依赖若干核心库,这些依赖将在安装过程中自动处理,但需要注意:
- surfplot 需使用其 GitHub 仓库中的最新版,而非 PyPI 上的版本,因后者尚未包含所需功能。
⚠️ 指定
surfplot版本由于 PyPI 上的
surfplot版本较旧,缺少plotfig所需功能,建议通过以下步骤安装其 GitHub 仓库的最新版。如果您无须绘制
brain surface图,可以忽略此步骤。
# 卸载旧版本
pip uninstall surfplot
# 克隆源码并安装
git clone --depth 1 https://github.com/danjgale/surfplot.git
cd surfplot
pip install .
# 安装完成后,返回上级目录并删除源码文件夹
cd ..
rm -rf surfplot
贡献
如果您希望体验这些功能或参与 plotfig 的开发,可以选择以 开发模式(editable mode) 安装项目。
这种安装方式允许您对本地源码的修改立即生效,非常适合调试、开发和贡献代码。
推荐先 Fork 仓库,然后克隆您自己的 Fork 并安装 main 分支:
git clone https://github.com/USERNAME/plotfig.git
cd plotfig
pip install -e .
欢迎提交 Issue 或 PR!
无论是 Bug 报告、功能建议、还是文档改进。
都非常欢迎在 Issue 中提出。
也可以直接提交 PR,一起变得更强 💪!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plotfig-1.13.0.tar.gz.
File metadata
- Download URL: plotfig-1.13.0.tar.gz
- Upload date:
- Size: 34.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a344cde0461671797226dfab2a4a22b050d19a8006d9799aca8235c4a5dd230
|
|
| MD5 |
f0924416dbc00dbe47b037179c947063
|
|
| BLAKE2b-256 |
8ae58799801b59d6be8e1ecb1ef12ff43eccf87bc9823013dbaafdfd55d0d490
|
Provenance
The following attestation bundles were made for plotfig-1.13.0.tar.gz:
Publisher:
python_publish.yml on RicardoRyn/plotfig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plotfig-1.13.0.tar.gz -
Subject digest:
4a344cde0461671797226dfab2a4a22b050d19a8006d9799aca8235c4a5dd230 - Sigstore transparency entry: 748689409
- Sigstore integration time:
-
Permalink:
RicardoRyn/plotfig@cf6afe84f4f46e7eb0df9e10f2a8b293706b04a8 -
Branch / Tag:
refs/tags/v1.13.0 - Owner: https://github.com/RicardoRyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_publish.yml@cf6afe84f4f46e7eb0df9e10f2a8b293706b04a8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file plotfig-1.13.0-py3-none-any.whl.
File metadata
- Download URL: plotfig-1.13.0-py3-none-any.whl
- Upload date:
- Size: 26.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42d4abf6e1bd0281f339d45c2d8e5429a50b75527b2419b8be4e992e8c3d13b4
|
|
| MD5 |
ef266906adcf79fc56cbff3c2e869906
|
|
| BLAKE2b-256 |
e28a3dfe1ac475b985ccee40c01ebb9fbde9f495b5377c10e24ce92c8aff78a0
|
Provenance
The following attestation bundles were made for plotfig-1.13.0-py3-none-any.whl:
Publisher:
python_publish.yml on RicardoRyn/plotfig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plotfig-1.13.0-py3-none-any.whl -
Subject digest:
42d4abf6e1bd0281f339d45c2d8e5429a50b75527b2419b8be4e992e8c3d13b4 - Sigstore transparency entry: 748689411
- Sigstore integration time:
-
Permalink:
RicardoRyn/plotfig@cf6afe84f4f46e7eb0df9e10f2a8b293706b04a8 -
Branch / Tag:
refs/tags/v1.13.0 - Owner: https://github.com/RicardoRyn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_publish.yml@cf6afe84f4f46e7eb0df9e10f2a8b293706b04a8 -
Trigger Event:
release
-
Statement type: