MathGroup Archive 2008

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

Search the Archive

Re: Color coding a Table entry

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92618] Re: Color coding a Table entry
  • From: Szabolcs Horvat <szhorvat at gmail.com>
  • Date: Thu, 9 Oct 2008 06:32:02 -0400 (EDT)
  • Organization: University of Bergen
  • References: <gci1tn$ji$1@smc.vnet.net>

AES wrote:
> I'm Printing (to the screen) a Table like, let's say,
> 
>    Table[{f1, f2, f3}, (x, xmin, xmax}]
> 
> and anytime the value of f2 goes negative I want that value printed in 
> Red.
> 

Before displaying the result on screen, replace each negative value:

{1, 2, -1, -2} /. x_?Negative -> Style[x, Red]


  • Prev by Date: Re: Color coding a Table entry
  • Next by Date: Re: Color coding a Table entry
  • Previous by thread: Re: Color coding a Table entry
  • Next by thread: Re: Color coding a Table entry