在Mathematica中绘制涉及三个轴数据的三维条形图

时间:2015-04-20 22:50:49

标签: wolfram-mathematica

所以我对Mathematica来说相当新,我一直在找不到在Mathematica的条形结构中显示三维数据的方法。但是,我能做的最好的事情来代表我的数据。 我的数据格式化的方式是我对所有点都有一个三坐标结构,但我想要表示每个单独的点。数据如下:

{0, 220, 0.05}, {0, 230, 0.33}, {0, 230, 0}, {0, 230, 0}, 
{0, 250, 1.04}, {0, 250, 0.26}, {0, 250, 1.01}, {0, 250, 4.83}, {0, 250, 0},
{0, 270, 2.69}, {10, 220, 0.6}, {10, 240, 1.28}, {10, 250, 0.97},
{15, 250, 0.25}, {15, 270, 3.52}

如何使图形成为三维图形,每个坐标点(所有三个轴)在图形上的单个条形图中表示而不是平面?

2 个答案:

答案 0 :(得分:0)

ListPointPlot3D[{{0, 220, 0.05}, {0, 230, 0.33}, {0, 230, 0}, {0, 230,
0}, {0, 250, 1.04}, {0, 250, 0.26}, {0, 250, 1.01}, {0, 250, 
4.83}, {0, 250, 0}, {0, 270, 2.69}, {10, 220, 0.6}, {10, 240, 
1.28}, {10, 250, 0.97}, {15, 250, 0.25}, {15, 270, 3.52}}, 
Filling -> Bottom, DataRange -> All]

这是你想要的吗?

答案 1 :(得分:0)

不确定你的目标是什么 - 注意ListPlot3D并不能正常工作,因为你的一些点在彼此之上......

 Show[{ListPlot3D[data ], Graphics3D[{PointSize[.1], Point[data]}]}]

enter image description here

 Show[Graphics3D@{Cuboid[{Append[#[[1 ;; 2]], 0] +
         {2, 2, 0}, # - {2, 2, 0}}] & /@ data}, Axes -> True, 
        AxesEdge -> {{-1, -1}, {1, -1}, {-1, -1}},
        BoxRatios -> {1, 2, .5}]

enter image description here