I would like to get a 3D visualization of a given matrix.
Here is a figure which may come from Mathematica. I want to plot something like it. When I use ListPlot3D
or BarChart3D
to plot my matrix, it does not have the style of one shown below, which is what I'm look for. How can I do a nice 3D visualization of my matrix?
data = ( {
{1, 2, 3},
{5, 4, 8},
{2, 5, 7}
} );
data = ArrayPad[data, {0, 1}];
xTicks = {{1.5, "A"}, {2.5, "B"}, {3.5, "C"}};
yTicks = {{1.5, "X"}, {2.5, "Y"}, {3.5, "Z"}};
zTicks = {{0, "0"}, 0, {4, "4"}, {8, "8"}};
pic = ListPlot3D[data,
Mesh -> None,
InterpolationOrder -> 0,
ColorFunction -> "Rainbow",
Filling -> Bottom,
FillingStyle -> {Opacity[0.9]},
PlotRange -> {Min[data] - 0.5, Max[data] + 0.2},
BoxRatios -> {1, 1, 0.5},
Ticks -> {xTicks, yTicks, zTicks},
DataRange -> All,
Boxed -> False,
FaceGrids -> {Bottom, Back, Left},
ImageSize -> 400]
this is the code that I plot a matrix using ListPlot3D
. The cuboids in it are not separate from each other, and the edges of the cuboid are fuzzy.