MathGroup Archive 2007

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

Search the Archive

Re: BarChart and Ticks problem.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73216] Re: [mg73179] BarChart and Ticks problem.
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 8 Feb 2007 03:31:27 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["Statistics`DataManipulation`"]; 
Needs["Graphics`"]; 
sid = N[Table[Sin[Pi Random[]], {1000}]]; 
freqtst = BinCounts[sid, {0, 1, 0.02}]; 
midp = Table[i, {i, 0.02, 1, 0.02}]; 

BarChart[Transpose[{freqtst, midp}],ImageSize->400,
    BarLabels->Join@@Table[{"","","","",i},{i,.1,1,.1}],
    BarStyle->Join[Table[LightBlue,{4}],{Red}]] ;


Bob Hanlon

---- luhaorice at gmail.com wrote: 
> Hello, All
> I have a problem with BarChart and Ticks.
> 
> Needs["Statistics`DataManipulation`"];
> Needs["Graphics`Graphics`"];
> sid = N[Table[Sin[Pi Random[]], {1000}]];
> freqtst = BinCounts[sid, {0, 1, 0.02}];
> midp = Table[i, {i, 0.02, 1, 0.02}];
> BarChart[Transpose[{freqtst, midp}]]
> (* The ticks on X axis is correct except crowded*)
> Show[%, Ticks -> Automatic]
> (*here, I have the wrong X axis ticks.  The range of the ticks is from
> 0 to 50 which doesn't make any sense because Sin[x] is always less or
> equal than 1. *)
> 
> ListPlot[Transpose[{midp, freqtst}], Ticks -> Automatic]
> (* this gives me the right answer*)
> 
> Any suggestions?
> Thanks!
> 


  • Prev by Date: Re: Integrating SphericalHarmonicY
  • Next by Date: Re: Passing a list as seperate parameters?
  • Previous by thread: Re: BarChart and Ticks problem.
  • Next by thread: Integrating SphericalHarmonicY