From: Jim Lambaugh on
Hi

I wish to make a histogram, but the size of each bin should be
infinitely small. So I am actually looking for something that plots
the coordinate (x,y), where x is the value of something and y is the
number of times the value x appears in the list.

I tried BarChart and Histogram, but no luck. You guys have any ideas?

Sincerely,
Jim.

From: dh on
Hi Jim,
what you describe is (apart from the norm) a probability density function.
Look it up under PDF in the help.
Daniel

On 29.03.2010 12:20, Jim Lambaugh wrote:
> Hi
>
> I wish to make a histogram, but the size of each bin should be
> infinitely small. So I am actually looking for something that plots
> the coordinate (x,y), where x is the value of something and y is the
> number of times the value x appears in the list.
>
> I tried BarChart and Histogram, but no luck. You guys have any ideas?
>
> Sincerely,
> Jim.
>


--

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh(a)metrohm.com>
Internet:<http://www.metrohm.com>


From: Jim Lambaugh on
The reason why I am asking (I should have included this in my first
post) is because I am trying to find a way to determine the size of
the largest gap between the values I have in my list.

From: Bob Hanlon on

data = RandomInteger[{0, 9}, 100];

pltData = {#, Count[data, #]} & /@
Union[data];

ListPlot[pltData,
Frame -> True,
Axes -> False,
Filling -> Bottom,
FillingStyle ->
Directive[Blue, Thick],
PlotRange ->
{0, Max[pltData[[All, 2]]] + 1}]


Bob Hanlon

---- Jim Lambaugh <lambaugh(a)gmail.com> wrote:

=============
Hi

I wish to make a histogram, but the size of each bin should be
infinitely small. So I am actually looking for something that plots
the coordinate (x,y), where x is the value of something and y is the
number of times the value x appears in the list.

I tried BarChart and Histogram, but no luck. You guys have any ideas?

Sincerely,
Jim.


From: Bill Rowe on
On 3/29/10 at 6:58 AM, lambaugh(a)gmail.com (Jim Lambaugh) wrote:

>The reason why I am asking (I should have included this in my first
>post) is because I am trying to find a way to determine the size of
>the largest gap between the values I have in my list.

Hmm... I don't see how a histogram with infinitely small bins
would help with this. Finding the largest gap between a list of
values is easily done as follows:

In[1]:= data = RandomReal[1, 10];

In[2]:= Max(a)Differences[Sort(a)data]

Out[2]= 0.292657

But if you want something that simulates a histogram with
infinitely small bin widths you could do something like:

data = RandomReal[1, 100];
f = Interpolation[Transpose@{Sort[data], (Range[100] - .5)/100},
InterpolationOrder -> 1];

f will be the cumulative distribution function. Note, using
InterpolationOrder->1 is needed to ensure f is never decreasing.
Since a histogram is simply the probability density function
which is the derivative of the cumulative distribution function

Plot[(f[x+.0001]-f[x])/.0001, {x, 0, 1}]

will be the desired histogram.

Note, because of using InterpolationOrder->1, the derivative is
not continuous. So, the resulting plot will not be a smooth
curve. It is possible to achieve this. But that requires a more
sophisticated approach to estimating the probability density
function than a simple histogram.