MathGroup Archive 2007

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

Search the Archive

Re: Re: BarChart - intensity of colour increases up the

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81913] Re: [mg81844] Re: BarChart - intensity of colour increases up the
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 6 Oct 2007 04:45:00 -0400 (EDT)
  • References: <fdvq2s$lhe$1@smc.vnet.net> <7149187.1191498569293.JavaMail.root@m35> <op.tzoroxuwqu6oor@monster.gateway.2wire.net> <8120514.1191610886650.JavaMail.root@m35> <op.tzqpjqm4qu6oor@monster.gateway.2wire.net> <BAY126-W7BB8C40D5F2B8450076A7C4A90@phx.gbl>

Hi,

StackedBarChart[{1, 2, 3}, {3, 3, 3},
  BarStyle -> {Yellow, Black}] /. {color_, edge_,
   Rectangle[{x1_, y1_}, {x2_, y2_}]} :> (clr =
    ToColor[color, RGBColor]; {edge,
    Polygon[{{x1, y1}, {x2, y1}, {x2, y2}, {x1, y2}},
     VertexColors -> {Append[List @@ clr, 0], Append[List @@ clr, 0],
       Append[List @@ clr, y2], Append[List @@ clr, y2]}]})

??

Regards
  Jens

Tom O'Brien wrote:
> By way of example, if I apply your solution to a StackedBarChart it 
> works well :
>  
> **
>
> *StackedBarChart[{1,2,3}, {3,3,3}]/.Rectangle[{x1_,*
>
> *y1_},{x2_,y2_}]¦Polygon[{{x1,y1},{x2,y1},{x2,y2},{x1,y2}},*
>
> *VertexColors®{{1,0,0,0},{1,0,0,0},{1,0,0,y2},{1,0,0,*
>
> *y2}}]
> * 
> However, what if my StackedBarChart has two colours on each bar, eg:
> *StackedBarChart[{1,2,3}, {3,3,3}, BarStyle®{Yellow, Black}]
> * 
> So my question is, how can I get the changing colour intensity up the 
> bar (which has been achieved on the BarChart) on a StackedBarChart, 
> where each bar has two colours ?
>  
> Thanks - I appreciate your help,
> Tom
>
> > To: tomfabtastic at hotmail.com; kuska at informatik.uni-leipzig.de; 
> mathgroup at smc.vnet.net
> > Subject: Re: [mg81844] Re: BarChart - intensity of colour increases 
> up the bar
> > From: drmajorbob at bigfoot.com
> > Date: Fri, 5 Oct 2007 14:53:40 -0500
> >
> > Send an example.
> >
> > Bobby
> >
> > On Fri, 05 Oct 2007 03:53:43 -0500, Tom O'Brien 
> <tomfabtastic at hotmail.com>
> > wrote:
> >
> > >
> > > Thanks,
> > > However, I'm having trouble getting it to work with a StackedBarChart
> > > that has a colour for each bar. The Rectangles are gathered like 
> {{a},
> > > {b}, {c}, ...} so I want the first half of the rectangles to be one
> > > colour and the second half another colour.
> > > Any suggestions ?
> > > Thanks,
> > > Tom> Date: Thu, 4 Oct 2007 13:44:47 -0500> To:
> > > kuska at informatik.uni-leipzig.de; mathgroup at smc.vnet.net;
> > > tomfabtastic at hotmail.com> Subject: Re: [mg81844] Re: BarChart -
> > > intensity of colour increases up the bar> From: 
> drmajorbob at bigfoot.com>
> > > > Or...> > Needs["BarCharts`"]> BarChart[{1, 2, 3}] /.> 
> Rectangle[{x1_,
> > > y1_}, {x2_, y2_}] :>> Polygon[{{x1, y1}, {x2, y1}, {x2, y2}, {x1, 
> y2}},>
> > > VertexColors -> {{1, 0, 0, 0}, {1, 0, 0, 0}, {1, 0, 0, y2}, {1, 
> 0,> 0,
> > > y2}}]> > Bobby> > On Thu, 04 Oct 2007 03:36:08 -0500, Jens-Peer 
> Kuska >
> > > <kuska at informatik.uni-leipzig.de> wrote:> > > 
> tomfabtastic at hotmail.com>
> > > > > > -- > DrMajorBob at bigfoot.com
> > > _________________________________________________________________
> > > Express yourself instantly with MSN Messenger! Download today it's 
> FREE!
> > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> >
> >
> > --
> > DrMajorBob at bigfoot.com
>
>
> ------------------------------------------------------------------------
> Express yourself instantly with MSN Messenger! MSN Messenger 
> <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>



  • Prev by Date: RE: Re: BarChart - intensity of colour increases up the
  • Next by Date: Re: Re: converting function from RasterArray to Raster
  • Previous by thread: RE: Re: BarChart - intensity of colour increases up the
  • Next by thread: Installing WebMathematica on a PC Windows XP Problems