Re: Label Bar Chart from data
- To: mathgroup at smc.vnet.net
- Subject: [mg99783] Re: Label Bar Chart from data
- From: dh <dh at metrohm.com>
- Date: Thu, 14 May 2009 01:42:14 -0400 (EDT)
- References: <gue2m2$7nl$1@smc.vnet.net>
Hi Charles,
try e.g.:
BarChart[mydata[[All, 2]], ChartLabels -> mydata[[All, 1]]]
Daniel
Charles L. Snyder wrote:
> 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
>