Echarts如何绘制四维数据散点图

发布于 2022-09-12 23:54:01 字数 1517 浏览 15 评论 0

大家好,我是Echarts新手!最近想使用Echarts实现四维数据可视化的功能,查询官网示例,相似的样例是3D散点图,但是缺少数据输入的部分。我现在的数据是以文件存储的,大概有40000+组数据,请问如何将数据导入echarts并且绘制出与样例相似的图像?

数据形式大概为:

-1.45,-1.95,-2.05,0.0909931
-1.45,-1.95,-1.85,0.101601
-1.45,-1.35,-0.85,0.274918
-1.45,-1.35,-0.65,0.286785
-1.45,-0.95,-2.25,0.13611
-1.45,-0.95,-2.05,0.151817
-1.45,-0.75,0.35,0.479072
-1.45,-0.75,0.55,0.448581
-1.45,-0.75,0.75,0.42611
-1.45,-0.75,0.95,0.392246
-1.45,-0.35,-1.45,0.303076
-1.45,-0.35,-1.25,0.342644
-1.45,-0.35,-1.05,0.393152
-1.45,-0.35,-0.85,0.447436
-1.45,-0.15,2.15,0.177069
-1.45,-0.15,2.35,0.149154
-1.45,0.05,-2.45,0.138945
-1.45,0.45,-1.05,0.388363
-1.45,0.45,-0.85,0.443186
-1.45,0.45,-0.65,0.504623
-1.25,-1.95,-1.85,0.138732
-1.25,-1.95,-1.65,0.1496
-1.25,-1.95,-1.45,0.165189
-1.25,-1.95,-1.25,0.180148
-1.25,-1.95,-1.05,0.204859
-1.25,-1.95,-0.85,0.219971
-1.25,-1.95,-0.65,0.235164
-1.25,-1.55,-1.85,0.197513
-1.25,-1.55,-1.65,0.213208
-1.25,-1.55,-1.45,0.237311
-1.25,-1.55,-1.25,0.276132
-1.25,-1.55,-1.05,0.295147
-1.25,-1.55,-0.85,0.332619
-1.25,-1.55,-0.65,0.332266
-1.25,-0.95,-0.25,0.556132
-1.25,-0.95,-0.05,0.592962
-1.25,-0.95,0.15,0.585007
-1.25,0.05,-0.65,0.709842
-1.25,0.05,-0.45,0.807794
-1.25,0.05,-0.25,0.84572
-1.25,0.05,-0.05,0.907899
-1.25,0.85,0.15,0.631298
-1.25,0.85,0.35,0.590148
-1.25,0.85,0.55,0.579689
-1.25,0.85,0.75,0.537545
-1.25,0.85,0.95,0.486481

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

呆萌少年 2022-09-19 23:54:01

数据输入不就是你自己去请求文件,得到数据,然后把数据处理成scatter3D需要的数据格式,scatter3D需要的数据格式可以看https://echarts.apache.org/zh...

主要就是一个数组,代表散点集合,数组每个元素代表一个点,这个元素可以是一个数组,也可以是一个对象格式,拿你发的案例来说,就是一个数组,分为四项,正好对应你的数据[x, y, z, value]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文