Skip to content

Commit d1a2beb

Browse files
authored
Add files via upload
1 parent e8a4cd1 commit d1a2beb

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

readme.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# UntPlot: UntPhesoca调值格局可视化图的Python绘图包
2+
该可视化方案及配色方案均来自UntPhesoca发表在第十四届中国语音学学术会议(PCC 2021)上的《一种直观的调值格局可视化方法》,海报可见[unt的知乎专栏](https://zhuanlan.zhihu.com/p/391608723)[unt的个人网站](https://phesoca.com/wp-content/uploads/linguistics/vis-tone-poster.pdf)
3+
4+
# 使用方法
5+
重庆格局的实例已经在`test.py`中给出,详见该文件。
6+
7+
- 引入包:
8+
9+
`from unt_plot import UntPlot`
10+
11+
- 实例化:
12+
13+
`up = UntPlot()`
14+
15+
此处可传入`figsize``grid_color`两个参数指明画布大小与网格颜色,默认值为`(14,14)`,`'grey'`
16+
17+
- 添加一条声调演化路径:
18+
19+
`up.create_path(text="阴", path=["44", "55", "45"], color="阴平")`
20+
21+
`UntPlot`类的方法`create_path()`函数接受以下参数:
22+
- `text`: 标注文字
23+
- `path`: 一个string组成的list,每个string是五度值调值,可以为曲折调,但不接受双折调
24+
- `color`: 可以使用给每个调类的预设颜色,不分阴阳的调类请随意选取一个。也可以直接传入「金茶草柳蔚靛雪墨」中的一种,或任何matplotlib接受的颜色字符串(如:`'red'``'"#FDCD00"'`),不传入此参数,则依次在上述颜色种循环使用。
25+
26+
# 技术细节
27+
`unt_plot.py`种定义了两个类`UntPlotBase``UntPlot`,后者是前者的子类,可以调用父类方法实现更底层的操作。

重庆.png

131 KB
Loading

0 commit comments

Comments
 (0)