Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Bar Chart Options Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54629] Re: [mg54581] Bar Chart Options Question
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 24 Feb 2005 03:21:33 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Needs["Graphics`"];

t={1,2,3,4,0,6,7,8,9,10,11,12,13,14};

BarChart[t, BarStyle->
      Flatten[Transpose[
          Table[
            {Red,Orange,Yellow,Brown,Green,Blue,Violet},
            {2}]]],
    Ticks->{Table[{(4n-1)/2,
            {"a","b","c","d","e","f","g"}[[n]]},
          {n,7}],Automatic}];


Bob Hanlon

> 
> From: Namrata Khemka <namrata.khemka at gmail.com>
To: mathgroup at smc.vnet.net
> Date: 2005/02/23 Wed AM 03:12:04 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg54629] [mg54581] Bar Chart Options Question
> 
> Hi Everyone,
> I am trying to do the following with bar chart.
> 
> t = {1,2,3,4,0,6,7,8,9,10,11,12,13}
> BarChart[t]
> 
> However, I would like 2 bars to be of a particular color. By this I
> mean, for the bars with value 1 and 2, it could be red, for bars with
> value 3 and 4 it could be green. and so on.
> 
> One of the other things that I would like to do is, label the bars. I
> would like to have 1 label for bars with value 1 and 2. Another label
> for bars with values 3 and 4 and so on..
> 
> Any suggestions as to how this can be done?
> 
> Thanks a lot in advance.
> 
> Namrata Khemka
> 
> 


  • Prev by Date: Re: problems plotting a derivative
  • Next by Date: Re: Mathematica 5 and Windows XP
  • Previous by thread: Bar Chart Options Question
  • Next by thread: Re: Bar Chart Options Question