MathGroup Archive 2004

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

Search the Archive

Re: Need help with HISTOGRAM plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51410] Re: [mg51388] Need help with HISTOGRAM plotting
  • From: János <janos.lobb at yale.edu>
  • Date: Sat, 16 Oct 2004 04:20:46 -0400 (EDT)
  • References: <200410150648.CAA05350@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Oct 15, 2004, at 2:48 AM, Peet wrote:

> I've only been playing around with the trial version of Mathematica
> for a few hours but I can't figure out how the heck to plot a
> histogram. I have a list of data (below) that I want to plot. The
> range is 80 to 100 and I want 5 bins, across 4 points each. I feel
> that this is a pretty straightforward thing to do, but I can't even
> plot a single histogram, even when I reproduce the samples that they
> give in the math book word for word. The data is below, any help would
> be greatly appreciated.
>
> 97,90,91,98,93,100,90,98,91,93,98,93,97,93,80,95,93,99,96,80,98,85,94,9 
> 8,96,88,93,92,88,97,90,90
>
>

Needs["Graphics`Graphics`"]
hst = {97,
     90, 91, 98, 93, 100, 90, 98, 91, 93, 98, 93, 97, 93, 80, 95, 93, 99,
       96, 80, 98, 85, 94, 98, 96, 88, 93, 92, 88, 97, 90, 90};

BarChart[Map[{Length[#], #[[1]]} &, Split[Sort[hst]]]]

It is a width=1 histogram.

János
----------------------------------------------
Trying to argue with a politician is like lifting up the head of a  
corpse.
(S. Lem: His Master Voice)


  • Prev by Date: Re: Re: Very basic question: Zoom into a 2-D plot with the mouse
  • Next by Date: Re: Need help with HISTOGRAM plotting
  • Previous by thread: Need help with HISTOGRAM plotting
  • Next by thread: Re: Re: Need help with HISTOGRAM plotting