Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: ArrayPlot: ColorRules v. ColorFunction

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57957] Re: [mg57934] ArrayPlot: ColorRules v. ColorFunction
  • From: "David Park" <djmp at earthlink.net>
  • Date: Tue, 14 Jun 2005 05:10:21 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Bruce,

Tmat = Array[Random[Real, {0, 1.2}] &, {5, 5}]

cfun[z_] :=
  Which[
    0 <= z <= 0.3, Red,
    0.3 < z <= 0.5, White,
    0.5 < z <= 1, Blue,
    True, Green]
ArrayPlot[Tmat, ColorFunction -> cfun];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


From: Bruce Colletti [mailto:vze269bv at verizon.net]
To: mathgroup 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



  • Prev by Date: spotlight escape sequences
  • Next by Date: Re: ArrayPlot: ColorRules v. ColorFunction
  • Previous by thread: ArrayPlot: ColorRules v. ColorFunction
  • Next by thread: Re: ArrayPlot: ColorRules v. ColorFunction