Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Re: Building lists

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

Needs["Graphics`Colors`"];

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

nmax = Length[colorList];

Show[Graphics[
      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:

Show[Graphics[
      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 shop.westworld.ca 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
>with
>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
>but
>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
>color.
>


  • 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