[Date Index] [Thread Index] [Author Index]
Re: ArrayPlot: ColorRules v. ColorFunction
Bruce Colletti wrote: > Re Mathematica 5.1 under WinXP. > > T is a 5x5 matrix of numbers. > > Using ArrayPlot, how would I display the colored array, where entries in [0, 0.3], (0.3,0.5] and (0.5,1] are Red, White and Blue respectively (default color is green for values outside [0,1])? > > Thanks. > > Bruce > Hi Bruce, You must to define your own color function as in the following line In:= ArrayPlot[T, ColorFunction -> (Which[0 <= #1 <= 0.3, Red, 0.3 < #1 <= 0.5, White, 0.5 < #1 <= 1, Blue, True, Green] & )]; Best regards, /J.M.