Update: Combining all steps in a function:
ClearAll[minMax, hybridBarChart]
minMax = Table[f[[1]][{f[[2]][Through@#@x], #2[[1]] < x <= #2[[2]]},
x] &[##], {f, {{NMaxValue, Max}, {NMinValue, Min}}}] &;
hybridBarChart[funcs_, range_, labels_: Automatic, cf_: "Rainbow"][
opts : OptionsPattern[]] := Module[{minmax = minMax[funcs, range]},
Show[Table[ParametricPlot3D[{t, i, v funcs[[i]][t]}, {t, range[[1]],
range[[2]]}, {v, 0, 1},
ColorFunction -> (ColorData[{cf, minmax}][ funcs[[i]][#4]] &),
ColorFunctionScaling -> False, opts, Method -> "Extrusion" -> .5,
PlotPoints -> 50, Mesh -> None], {i, Length@funcs}],
Ticks -> {Automatic, Transpose[{Range[Length@funcs],
labels /. Automatic -> Range[Length@funcs]}], Automatic},
FilterRules[{opts}, Options @ Graphics3D], ImageSize -> Large,
Lighting -> "Neutral", PlotRange -> All, BoxRatios -> {1, 1, 1/2}]]
Examples :
functions = Function /@ (Range[5] Abs[Sin[#]]);
labels = "data" <> ToString[#] & /@ Range[Length @ functions];
hybridBarChart[functions, {0, 3 Pi}][ImageSize -> Medium, BaseStyle -> Opacity[.5]]
hybridBarChart[functions, {0, 3 Pi}, labels, "SolarColors"][
Method -> "Extrusion" -> .8, ImageSize -> Medium]
Original answer:
You can also use ParametricPlot3D
with the option "Extrusion"
:
functions = Function /@ (Range[5] Abs[Sin[#]]);
labels = "data" <> ToString[#] & /@ Range[Length @ functions];
max = NMaxValue[{Max[Through@functions@x], 0 < x <= 3 Pi}, x];
min = NMinValue[{Min[Through@functions@x], 0 < x <= 3 Pi}, x];
pp3D[f_, i_] := ParametricPlot3D[{t, i[[1]], v f[t]}, {t, 0, 3 Pi}, {v, 0, 1},
PlotPoints -> 50, Mesh -> None, Method -> "Extrusion" -> .3,
ColorFunction -> (ColorData[{"Rainbow", {min, max}}][f[#4]] &),
ColorFunctionScaling -> False]
Show[MapIndexed[pp3D, functions], ImageSize -> Large,
Lighting -> "Neutral", PlotRange -> All, BoxRatios -> {1, 1, 1/2},
Ticks -> {Automatic, Transpose[{Range[Length@functions], labels}], Automatic}]
Add the option BaseStyle -> Opacity[.5]
in the definition of pp3D
to get
Use "Extrusion" -> 1
instead of "Extrusion" -> .3
to get
Change "Rainbow"
to "AvocadoColors"
to get
Use functions = Function /@ (Range[5] Abs[# Sin[#]]);
to get