MathGroup Archive 2007

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

Search the Archive

Coloring cells

  • To: mathgroup at
  • Subject: [mg83574] Coloring cells
  • From: Jamie Coventry <jcoventry at>
  • Date: Fri, 23 Nov 2007 05:33:55 -0500 (EST)
  • References: <fhrrsj$5gh$> <fhu7ui$7fh$> <>

Hi All,

I'm presenting data in a square arrangement and am trying to  
highlight specific cells in it which have something in common, e.g.  
all are prime, or all are odd numbers. I don't mind if the data is in  
an array/matrix/table, as long as it is n x n.

myData = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

How do I either color the text or the background of a particular  
cell, based on a rule (e.g. how could I color just 2, 3, 5, and 7 in  
the data given)?

Thanks in advance,


  • Prev by Date: Contour Lines
  • Next by Date: Re: negative FileByteCount
  • Previous by thread: Re: ordered positions (OrderedPosition?)
  • Next by thread: Re: Coloring cells