Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Label Bar Chart from data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99768] Re: Label Bar Chart from data
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 13 May 2009 06:20:05 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <gue2m2$7nl$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

may be that

BarChart[#[[2]] & /@ mydata, ChartLabels -> (#[[1]] & /@ mydata)]

helps

Regards
   Jens

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
> 


  • Prev by Date: Re: Optimize speed of plotting mesh
  • Next by Date: Re: Assign new values to matrix using indices
  • Previous by thread: Label Bar Chart from data
  • Next by thread: Re: Label Bar Chart from data