Skip to main content
cylinders with colour
Source Link
flinty
  • 26.3k
  • 2
  • 23
  • 98

You could try using some Cuboid's:

f[i_, j_] := i*j; data = Table[f[i, j], {i, 1, 25}, {j, 1, 25}]; bar[{i_, j_}, h_] := Cuboid[{i - 0.5, j - 0.5, 0}, {i + 0.5, j + 0.5, h}] Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1 ] 

cuboid chart

... and here I've spiced it up with colour, axes, and cylinders:

huescale = MinMax[data]; bar[{i_, j_}, h_] := {Hue[Rescale[h, huescale]], Cylinder[{{i, j, 0}, {i, j, h}}, 0.5]} Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1, Axes -> True, AxesLabel -> {i, j, f}, Lighting -> "Neutral" ] 

cylinders chart

You could try using some Cuboid's:

f[i_, j_] := i*j; data = Table[f[i, j], {i, 1, 25}, {j, 1, 25}]; bar[{i_, j_}, h_] := Cuboid[{i - 0.5, j - 0.5, 0}, {i + 0.5, j + 0.5, h}] Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1 ] 

cuboid chart

You could try using some Cuboid's:

f[i_, j_] := i*j; data = Table[f[i, j], {i, 1, 25}, {j, 1, 25}]; bar[{i_, j_}, h_] := Cuboid[{i - 0.5, j - 0.5, 0}, {i + 0.5, j + 0.5, h}] Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1 ] 

cuboid chart

... and here I've spiced it up with colour, axes, and cylinders:

huescale = MinMax[data]; bar[{i_, j_}, h_] := {Hue[Rescale[h, huescale]], Cylinder[{{i, j, 0}, {i, j, h}}, 0.5]} Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1, Axes -> True, AxesLabel -> {i, j, f}, Lighting -> "Neutral" ] 

cylinders chart

Source Link
flinty
  • 26.3k
  • 2
  • 23
  • 98

You could try using some Cuboid's:

f[i_, j_] := i*j; data = Table[f[i, j], {i, 1, 25}, {j, 1, 25}]; bar[{i_, j_}, h_] := Cuboid[{i - 0.5, j - 0.5, 0}, {i + 0.5, j + 0.5, h}] Graphics3D[{ MapIndexed[bar[#2, #1] &, data, {2}] }, BoxRatios -> 1 ] 

cuboid chart