MathGroup Archive 2008

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

Search the Archive

Re: Color coding a Table entry

  • To: mathgroup at
  • Subject: [mg92725] Re: Color coding a Table entry
  • From: Bill Rowe <readnews at>
  • Date: Sat, 11 Oct 2008 06:46:20 -0400 (EDT)

On 10/10/08 at 4:36 AM, siegman at (AES) wrote:

>Original post:

>>redneg[expr_] := If[cond[expr], Style[expr, Red], expr, expr]

>Would  Plot[redneg[f[x]], {x, xmin, xmax}]  make the plot turn black
>below the x axis???   Have to try it and see . . .

No, this will simply generate an error message telling you the
Plot has no idea what to do with functions that do not return
numeric values. Plotting color is set by specifying a PlotStyle.
To get different plot colors for positive/negative values you
would need to define a custom ColorFunction to set the plot color.

  • Prev by Date: Re: Mathematica Plot Functions
  • Next by Date: Re: Prime Puzzle with Mathematica
  • Previous by thread: Re: Color coding a Table entry
  • Next by thread: Re: Re: Color coding a Table entry