Re: Color coding a Table entry
- To: mathgroup at smc.vnet.net
- Subject: [mg92725] Re: Color coding a Table entry
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sat, 11 Oct 2008 06:46:20 -0400 (EDT)
On 10/10/08 at 4:36 AM, siegman at stanford.edu (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.