@@ -18,6 +18,7 @@ polar.render()
1818```
1919![ example-0] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-0.png )
2020
21+
2122用极坐标系画出一朵小花
2223``` python
2324import math
@@ -35,6 +36,26 @@ polar.render()
3536```
3637![ example-1] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-1.png )
3738
39+
40+ 还可以给小花涂上颜色
41+ ``` python
42+ import math
43+ from pyecharts import Polar
44+
45+ data = []
46+ for i in range (361 ):
47+ t = i / 180 * math.pi
48+ r = math.sin(2 * t) * math.cos(2 * t)
49+ data.append([r, i])
50+ polar = Polar(" 极坐标系示例" , width = 1200 , height = 600 )
51+ polar.add(" Color-Flower" , data, start_angle = 0 , symbol = None , axis_range = [0 , None ],
52+ area_color = " #f71f24" , area_opacity = 0.6 )
53+ polar.show_config()
54+ polar.render()
55+ ```
56+ ![ example-1-1] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-1-1.png )
57+
58+
3859用散点图画出一个爱心
3960``` python
4061from pyecharts import Scatter
@@ -46,6 +67,7 @@ scatter.render()
4667```
4768![ example-2] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-2.png )
4869
70+
4971用散点图画出一个火辣的 Bra
5072``` python
5173from pyecharts import Scatter
@@ -57,6 +79,7 @@ scatter.render()
5779```
5880![ example-3] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-3.png )
5981
82+
6083用散点图画出一个性感的 Bra
6184``` python
6285from pyecharts import Scatter
@@ -68,6 +91,7 @@ scatter.render()
6891```
6992![ example-4] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-4.png )
7093
94+
7195某地最低温和最高气温折线图
7296``` python
7397from pyecharts import Line
@@ -81,6 +105,7 @@ line.render()
81105```
82106![ example-5] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-5.gif )
83107
108+
84109饼图嵌套
85110``` python
86111from pyecharts import Pie
@@ -93,6 +118,7 @@ pie.render()
93118```
94119![ example-6] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-6.png )
95120
121+
96122饼图再嵌套
97123``` python
98124import random
@@ -109,6 +135,7 @@ pie.render()
109135```
110136![ example-7] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-7.gif )
111137
138+
112139某地的降水量和蒸发量柱状图
113140``` python
114141from pyecharts import Bar
@@ -123,3 +150,55 @@ bar.show_config()
123150bar.render()
124151```
125152![ example-8] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-8.png )
153+
154+
155+ 各类电影中"好片"所占的比例
156+ ``` python
157+ from pyecharts import Pie
158+
159+ pie = Pie(' 各类电影中"好片"所占的比例' , " 数据来着豆瓣" , title_pos = ' center' )
160+ pie.add(" " , [" 剧情" , " " ], [25 , 75 ], center = [10 , 30 ], radius = [18 , 24 ],
161+ label_pos = ' center' , is_label_show = True , label_text_color = None , )
162+ pie.add(" " , [" 奇幻" , " " ], [24 , 76 ], center = [30 , 30 ], radius = [18 , 24 ],
163+ label_pos = ' center' , is_label_show = True , label_text_color = None , legend_pos = ' left' )
164+ pie.add(" " , [" 爱情" , " " ], [14 , 86 ], center = [50 , 30 ], radius = [18 , 24 ],
165+ label_pos = ' center' , is_label_show = True , label_text_color = None )
166+ pie.add(" " , [" 惊悚" , " " ], [11 , 89 ], center = [70 , 30 ], radius = [18 , 24 ],
167+ label_pos = ' center' , is_label_show = True , label_text_color = None )
168+ pie.add(" " , [" 冒险" , " " ], [27 , 73 ], center = [90 , 30 ], radius = [18 , 24 ],
169+ label_pos = ' center' , is_label_show = True , label_text_color = None )
170+ pie.add(" " , [" 动作" , " " ], [15 , 85 ], center = [10 , 70 ], radius = [18 , 24 ],
171+ label_pos = ' center' , is_label_show = True , label_text_color = None )
172+ pie.add(" " , [" 喜剧" , " " ], [54 , 46 ], center = [30 , 70 ], radius = [18 , 24 ],
173+ label_pos = ' center' , is_label_show = True , label_text_color = None )
174+ pie.add(" " , [" 科幻" , " " ], [26 , 74 ], center = [50 , 70 ], radius = [18 , 24 ],
175+ label_pos = ' center' , is_label_show = True , label_text_color = None )
176+ pie.add(" " , [" 悬疑" , " " ], [25 , 75 ], center = [70 , 70 ], radius = [18 , 24 ],
177+ label_pos = ' center' , is_label_show = True , label_text_color = None )
178+ pie.add(" " , [" 犯罪" , " " ], [28 , 72 ], center = [90 , 70 ], radius = [18 , 24 ],
179+ label_pos = ' center' , is_label_show = True , label_text_color = None , is_legend_show = True , legend_top = " center" )
180+ pie.show_config()
181+ pie.render()
182+ ```
183+ ![ example-9] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-9.png )
184+
185+
186+ 用极坐标系画出一个蜗牛壳
187+ ``` python
188+ import math
189+ from pyecharts import Polar
190+
191+ data = []
192+ for i in range (5 ):
193+ for j in range (101 ):
194+ theta = j / 100 * 360
195+ alpha = i * 360 + theta
196+ r = math.pow(math.e, 0.003 * alpha)
197+ data.append([r, theta])
198+ polar = Polar(" 极坐标系示例" )
199+ polar.add(" " , data, symbol_size = 0 , symbol = ' circle' , start_angle = - 25 , is_radiusaxis_show = False ,
200+ area_color = " #f3c5b3" , area_opacity = 0.5 , is_angleaxis_show = False )
201+ polar.show_config()
202+ polar.render()
203+ ```
204+ ![ example-10] ( https://github.com/chenjiandongx/pyecharts/blob/master/images/example-10.png )
0 commit comments