hours =["12a","1a","2a","3a","4a","5a","6a","7a","8a","9a","10a","11a","12p","1p","2p","3p","4p","5p","6p","7p","8p","9p","10p","11p",]
days =["Saturday","Friday","Thursday","Wednesday","Tuesday","Monday","Sunday"]
data =[]for i inrange(7):for i2 inrange(24):
data.append([i,i2,random.randint(0,3)])for i3 in data:print(i3)
data =[[d[1], d[0], d[2]]for d in data](
Bar3D().add(
series_name="",
data=data,
xaxis3d_opts=opts.Axis3DOpts(type_="category", data=hours),
yaxis3d_opts=opts.Axis3DOpts(type_="category", data=days),
zaxis3d_opts=opts.Axis3DOpts(type_="value"),).set_global_opts(
visualmap_opts=opts.VisualMapOpts(
max_=20,
range_color=["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026",],)).render("bar3d_punch_card.html"))
2、3D柱状图
import random
from pyecharts import options as opts
from pyecharts.charts import Bar3D
from pyecharts.faker import Faker
data= [(i, j, random.randint(0,12))for i in range(6)for j in range(24)]
c =(
Bar3D()
.add("",
[[d[1], d[0], d[2]] for d indata],
xaxis3d_opts=opts.Axis3DOpts(Faker.clock, type_="category"),
yaxis3d_opts=opts.Axis3DOpts(Faker.week_en, type_="category"),
zaxis3d_opts=opts.Axis3DOpts(type_="value"),)
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(max_=20),
title_opts=opts.TitleOpts(title="Bar3D-基本示例"),)
.render("bar3d_base.html"))
3、3D柱状图
import random
from pyecharts import options as opts
from pyecharts.charts import Bar3D
x_data = y_data = list(range(10))def generate_data():data= []
for j in range(10):for k in range(10):
value = random.randint(0,9)data.append([j, k, value *2+4])returndata
bar3d = Bar3D()for _ in range(10):
bar3d.add("",
generate_data(),
shading="lambert",
xaxis3d_opts=opts.Axis3DOpts(data=x_data, type_="value"),
yaxis3d_opts=opts.Axis3DOpts(data=y_data, type_="value"),
zaxis3d_opts=opts.Axis3DOpts(type_="value"),)
bar3d.set_global_opts(title_opts=opts.TitleOpts("Bar3D-堆叠柱状图示例"))
bar3d.set_series_opts(**{"stack":"stack"})
bar3d.render("bar3d_stack.html")
dll文件在计算机领域中扮演着至关重要的角色,它代表的是Dynamic Link Library(动态链接库)文件。那么,究竟什么是dll文件呢?简单来说,dll文件是一种特殊的程序模块,其中包含了可以被多个应用程序…
在风起云涌的AI江湖,NVIDIA凭借其CUDA生态和优秀的硬件大杀四方,立下赫赫战功,而另一家公司AMD也不甘示弱,带着他的生态解决方案ROCm开始了与不世出的NVIDA的正面硬钢,"ROCm is the answer to CUDA", AMD官网…