I'm trying to produce an Histogram3D-like graph, but with a little more customization.
In particular I want to manually specify the color of each cuboid and to print some information on the top faces.
I did manage to do this, more or less, with a code like the following:
Graphics3D[{
With[{data = RandomReal[{0, 1}, {10, 10}],
additionalHeight = 0.0001},
Table[
With[{color = Which[
0 <= data[[i, o]] <= 0.2, Red,
0.2 < data[[i, o]] <= 0.5, Orange,
0.5 < data[[i, o]] <= 1, Green
]},
{
color, Cuboid[{i - 1/2, o - 1/2, 0}, {i + 1/2, o + 1/2, #}],
Texture[
Style[
Column[{"in=" <> ToString@i, "out=" <> ToString@o}, Right,
Background -> color],
Black, Bold
]
], EdgeForm[],
Polygon[{{i - 0.4, o - 0.4, # + additionalHeight}, {i + 0.4,
o - 0.4, # + additionalHeight}, {i + 0.4,
o + 0.4, # + additionalHeight}, {i - 0.4,
o + 0.4, # + additionalHeight}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]
} &@data[[i, o]]
],
{i, 10},
{o, 10}
]
]
},
Axes -> True,
ImageSize -> Large,
RotationAction -> "Clip"
]
However, as you can see, the output can definitely be better. In particular I would like to remove those lines above and below each texture. I'm guessing they are due to the slight difference in height between the top face of the cuboid and the texture. However, removing this difference produces an even worse result.
Do you have any tip on how can this code be improved?