Re: ArrayPlot: ColorRules v. ColorFunction
- To: mathgroup at smc.vnet.net
- Subject: [mg57951] Re: ArrayPlot: ColorRules v. ColorFunction
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Tue, 14 Jun 2005 05:10:16 -0400 (EDT)
- Organization: Uni Leipzig
- References: <d8jli2$stv$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
mat = Table[Random[], {5}, {5}];
ArrayPlot[mat, ColorFunctionScaling -> False,
ColorFunction -> (Which[# < 0.5, RGBColor[1, 0,
0], # < 0.5,
RGBColor[1, 1, 1], # < 1, RGBColor[0, 0, 1],
True,
RGBColor[0, 1, 0]] &)]
Regards
Jens
"Bruce Colletti" <vze269bv at verizon.net> schrieb im
Newsbeitrag news:d8jli2$stv$1 at smc.vnet.net...
> 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
>