From: gekko on 4 Jun 2010 08:01 Hi, I'm trying to plot a Histogram given a list of (value, frequency) pairs. It looks like the old package function Histogram will allow this using the FrequencyData option, however, this option has been removed from the built-in implementation in V7. Does anyone know why this was removed, and whether there is an alternative way to do this? Thanks, P.
From: Bob Hanlon on 5 Jun 2010 07:32 data = Table[ {RandomInteger[{1, 100}], RandomInteger[{10, 20}]}, {5}] Module[{vals = data[[All, 1]], d}, d = Min[Differences[Sort[vals]]]/3; Show[ Graphics[ {LightBlue, EdgeForm[Thin], Tooltip[ Rectangle[ {#[[1]] - d, 0}, {#[[1]] + d, #[[2]]}], #[[2]]] & /@ data}], AspectRatio -> 1/GoldenRatio, Axes -> True, AxesOrigin -> {Min[vals] - 3 d, 0}]] Bob Hanlon ---- gekko <pfalloon(a)gmail.com> wrote: ============= Hi, I'm trying to plot a Histogram given a list of (value, frequency) pairs. It looks like the old package function Histogram will allow this using the FrequencyData option, however, this option has been removed from the built-in implementation in V7. Does anyone know why this was removed, and whether there is an alternative way to do this? Thanks, P.
|
Pages: 1 Prev: DateListPlot (Margins? or something?) Next: DSolve bug in 7.0.0 |