Histogram without binning

A straightforward question: Is there a simple way to get a
histogram that does not bin any values together at all, but simply
creates one bar for each distinct value in the dataset?

···

--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
  --author unknown

Hi,

···

On 8 January 2011 18:57, OKB (not okblacke) <brenbarn@...1219...> wrote:

Is there a simple way to get a
histogram that does not bin any values together at all, but simply
creates one bar for each distinct value in the dataset?

You can just use the bins keyword to plt.hist (or np.hist):
plt.hist ( x, bins=np.unique ( x ) )

Jose