Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to mimic the below image type using Mathematica's BarChart3D function. For this purpose I wrote the following code but it isn't working.

enter image description here

BarChart3D[{1, 2, 3},
   ImageSize->{550,250},LabelingFunction -> Above, 
   ChartLabels -> Placed[barChartLabels, Below], BarSpacing -> 1, 
   ChartStyle -> Green, 
   ChartElements -> (Graphics3D[{Purple, Glow[Purple], EdgeForm[Purple], 
                     Cuboid[]}, Boxed -> False]), 
   LabelStyle -> {Directive[Bold, 15], Directive[Bold, 15]}
]
share|improve this question
3  
Apart from barChartLabels not being defined everything seems to work as intended. What is your problem? –  Sjoerd C. de Vries Dec 28 '12 at 11:31
    
Could you post a copy of what you're seeing and describe what deviations from the above plot you want to fix? –  rcollyer Dec 28 '12 at 17:25
    
mainly I want to fix labels (<=Temperature,Hours) to the Left,Bottom of the Barchart.and also I have a doubt,can we make Barchart3D exact like that? –  subbu Dec 29 '12 at 7:03

1 Answer 1

I'm not sure why you'd want to reproduce such an ugly chart, but you can get closer to it with something like this:

 BarChart3D[{, 0.8, 62.7, 0.7, 0.2, 1.3, 17.5, 241.2, 2.7, ,},
  LabelingFunction -> Above, 
  ChartElements -> Graphics3D[{EdgeForm[], Magenta, Cuboid[]}],
  AxesLabel -> {Style["<= Temperature", 14, FontFamily -> "Helvetica"],
    "", 
   Rotate[Style["Hours", 14, FontFamily -> "Helvetica"], Pi/2]},
  Ticks -> {
   {{1, "32"}, {2, "36"}, {3, "42"}, {4, "44"}, {5, "46"}, {6, "50"},
      {7, "60"}, {8, "68"}, {9, "80"}, {10, "100"}, {11, "158"}}, 
     Automatic, 
     {0, 200, 400}},
  ChartStyle -> {Yellow},
  Lighting -> "Neutral",
  PlotRange -> {0, 400},
  ViewAngle -> 0.6,
  ViewPoint -> {0., -2., 0.}, ViewVertical -> {0., 0., 1.},
  AspectRatio -> .6,
  ImageSize -> 800
 ]

crappy chart

All you've got to do now is get rid of the shiny background, switch off the perspective, pretend there's some kind of shelf, and you're nearly there. But, to be honest, you're better off with a 2D chart that doesn't distract you with dodgy perspective...

share|improve this answer
    
This is the best reproduction of the ugly chart ever! 1+ –  Murta Dec 29 '12 at 18:23
    
Your code was working fine,but Barchart was not rotated , after deploying into CDF.why? –  subbu Dec 31 '12 at 10:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.