Re: MatrixPlot with color range bar

*To*: mathgroup at smc.vnet.net*Subject*: [mg99047] Re: [mg99013] MatrixPlot with color range bar*From*: "David Park" <djmpark at comcast.net>*Date*: Sat, 25 Apr 2009 04:49:51 -0400 (EDT)*References*: <28805459.1240559898199.JavaMail.root@n11>

My suggestion: data = Table[Cos[x y/150.], {x, -50, 50}, {y, -50, 50}]; matrixplot = MatrixPlot[data, ColorFunction -> "Rainbow"]; legend = DensityPlot[y, {x, 0, 1}, {y, -1, 1}, ColorFunction -> (ColorData["Rainbow"][Rescale[#, {-1, 1}]] &), ColorFunctionScaling -> False, PlotPoints -> 51, AspectRatio -> Full, PlotRange -> {{0, 1}, {-1, 1}}, Background -> None, Frame -> True, FrameTicks -> {{None, Range[-1, 1, .25]}, {None, None}}, ImagePadding -> {{2, 30}, {5, 5}}, ImageSize -> {50, 400}]; Graphics[ {Inset[matrixplot, {4, 4.3}, {Center, Center}, {400, 450} 0.02], Inset[legend, {8.8, 4.2}, {Center, Center}, {5, 40} 0.17], Text[Style["Matrix Plot with Legend", Large], {5, 9.3}], Text[Style["Legend", 14, Bold], {8.5, 8.0}]}, PlotRange -> {{0, 10}, {0, 10}}, Frame -> False, ImageSize -> 500] David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: =C0=CC=B4=F6=C0=E7 [mailto:lee.deokjae at gmail.com] I'd like to draw plots like http://www.gle-graphics.org/examples/3dplots/informationgain.png I know that MatrixPlot function draws such plots. My question is how to draw color range bar like that on the right side = of the plot at the url. Is there any options of MatrixPlot or tricks to draw such color range = bar ?