来几个pyecharts.charts.Boxplot的例子
时间: 2023-03-26 08:01:05 浏览: 51
好的,以下是几个pyecharts.charts.Boxplot的例子:
1.
```python
from pyecharts.charts import Boxplot
data = [
[850, 740, 900, 107, 930, 850, 950, 980, 980, 880],
[960, 940, 960, 940, 880, 800, 850, 880, 900],
[880, 880, 880, 860, 720, 720, 620, 860, 970],
[890, 810, 810, 820, 800, 770, 760, 740, 750],
]
boxplot = Boxplot()
boxplot.add_xaxis(["A", "B", "C", "D"])
boxplot.add_yaxis("boxplot", boxplot.prepare_data(data))
boxplot.set_global_opts(title_opts=opts.TitleOpts(title="Boxplot"))
boxplot.render("boxplot.html")
```
2.
```python
from pyecharts.charts import Boxplot
data = [
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
[820, 932, 901, 934, 129, 133, 132],
]
boxplot = Boxplot()
boxplot.add_xaxis(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T"])
boxplot.add_yaxis("boxplot", boxplot.prepare_data(data))
boxplot.set_global_opts(title_opts=opts.TitleOpts(title="Boxplot"))
boxplot.render("boxplot.html")
```
希望这些例子能够帮助到你!