MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: BarChart3D with labels

  • To: mathgroup at
  • Subject: [mg21336] Re: [mg21326] BarChart3D with labels
  • From: BobHanlon at
  • Date: Sun, 26 Dec 1999 01:26:14 -0500 (EST)
  • Sender: owner-wri-mathgroup at

In my initial reply, I should have pointed out that the BarValues can be 
displayed in a default format by just setting the BarChart option BarValues 
to True


lst1 = 20*Table[Random[], {5}];

    BarLabels -> 
      Table["Group " <> ToString[k], {k, Length[lst1]}], 
    BarValues -> True, 
    PlotRange -> All];

However, to control the format of the BarValues, they need to be explicitly 
specified. In my initial reply I modified the precision of the BarValues. 
here I modify their precision and color (as well as the color of the 


colorFunc[x_?NumericQ, lst_List] := 
    Module[{mu = Mean[lst], sigma = StandardDeviation[lst]}, 
      If[Abs[x - mu] <= sigma, RGBColor[0, .75, 0], 
        If[x - mu > sigma, RGBColor[1, 0, 0], RGBColor[0, 0, 1]]]];

    BarLabels -> 
        StyleForm["Group " <> ToString[k], 
          FontColor -> colorFunc[lst1[[k]], lst1]], 
        {k, Length[lst1]}], 
    Prolog -> 
          StyleForm[NumberForm[lst1[[k]], {4, 2}], 
            FontColor -> colorFunc[lst1[[k]], lst1]], 
          {k, lst1[[k]]}, {0, -1}], 
        {k, Length[lst1]}], 
    PlotRange -> All];

Bob Hanlon

  • Prev by Date: Re: BarChart3D with labels
  • Next by Date: RowBox-es
  • Previous by thread: Re: BarChart3D with labels
  • Next by thread: computing Dickman's function