MathGroup Archive 2000

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

Search the Archive

Re: Building lists

  • To: mathgroup at
  • Subject: [mg22340] Re: [mg22312] Building lists
  • From: BobHanlon at
  • Date: Fri, 25 Feb 2000 21:13:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at


colorList = {Blue, Red, Purple, Plum, Gold, Olive, Pink, Navy, Mint, Black};

nmax = Length[colorList];

      Table[{colorList[[n]], Disk[{0, 0}, 20(nmax - n + 1)]}, {n, nmax}]], 
    AspectRatio -> 1];

or equivalently,

Show[Graphics[{colorList[[#]], Disk[{0, 0}, 20(nmax - # + 1)]} & /@ 
        Range[nmax]], AspectRatio -> 1];

If a list of specific colors is not required, then use a color function:

      Table[{Hue[2(nmax - n)/(nmax - 1)], 
          Disk[{0, 0}, 20(nmax - n + 1)]}, {n, nmax}]], AspectRatio -> 1];

Bob Hanlon

In a message dated 2/24/2000 4:32:53 AM, tdevries at writes:

>The graphics command below builds a simple bull's eye. (I used it for a
>probability question in my math class)  It does what I want it to, but
>all the repetition I know that it is probably possible to do it more simply.
> It isn't so long but I figured I could learn something by seeing how this
>command could be duplicated in different ways.   I was looking at Thread
>couldn't quite manage to get things to work out.   The specific colors
>aren't really important, but I did want to get each disk to be a different

  • Prev by Date: Re: a Graphic in a Graphic
  • Next by Date: Re: Out of memory problem
  • Previous by thread: Re: Building Lists
  • Next by thread: Re: Building lists