MathGroup Archive 2009

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

Search the Archive

Label Bar Chart from data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99757] Label Bar Chart from data
  • From: "Charles L. Snyder" <clsnyder at gmail.com>
  • Date: Wed, 13 May 2009 05:08:39 -0400 (EDT)

Given

mydata={{44970, 2357.7}, {54324, 1859.34}, {49500, 1797.44}, {54161,
  1432.26}, {49505, 1421.2}, {49605, 1292}, {54640, 1260}, {39503,
  760}, {49525, 711.31}, {43324, 617.1}}

This should be simple, but I can't seem to find the answer. I want a
BarChart of the second values {2357.7, 1859.34,....}, labeled with the
corresponding first value. This comes close, but all "bars' are
labeled with 44970, not sequentially.
;
BarChart[{#[[2]]} & /@ mydata, ChartLabels -> {#1} & /@ mydata]

The actual data is much larger, precluding simply entering the ten
values given above. Can someone point me in the right direction?

Thanks in advance


  • Prev by Date: GuiKit, seeking some guidance and comments
  • Next by Date: Re: Frequency data
  • Previous by thread: Re: GuiKit, seeking some guidance and comments
  • Next by thread: Re: Label Bar Chart from data