I would like to have the filling of my ListPlot3D
display the same color than the one applied to the data. This question makes sense only in the case of conditional coloring of data (according to their height for example). Moreover, I am using the option InterpolationOrder -> 0
and I understand what I ask is kind of tricky in case of higher orders.
Here is a minimal example
table = {{1, 2, 1, 2}, {3, 1, 3, 2}, {4, 3, 4, 2}, {1, 2, 3, 4}};
ListPlot3D[
table,
InterpolationOrder -> 0,
ColorFunction -> "DarkRainbow",
Filling -> Axis,
FillingStyle -> {Opacity[1]}, Mesh -> None
]
which gives gray filling beneath the data.
My question is the following :
Is it possible to specify a dynamic color in the FillingStyle
so that it will match the data ?
Answer
If nobody comes with a much cleverer solution, this might be a way to achieve what you're looking for. However, first your data have to be reshaped.
newtable = {{1, 2, 1}, {3, 1, 3}, {4, 3, 4}};
BarChart3D[newtable, ChartLayout -> "Grid",
ViewPoint -> {3.33, -8.26, 5.36}, ColorFunction -> "DarkRainbow",
Method -> {"Canvas" -> None}]
With some additional options:
BarChart3D[newtable, ChartLayout -> "Grid", ChartElementFunction -> "Cube",
ViewPoint -> {3.33, -8.26, 5.36}, ColorFunction -> "DarkRainbow",
Method -> {"Canvas" -> None}, BarSpacing -> {None, None}]
Comments
Post a Comment