But most custom graphics requires custom work. The built-in Mathematica
=E2=80=98set-piece-plots=E2=80=99 only work well for restricted classes
of plots. So in general one should expect to have to do the work.
Usually, each graphics problem requires it own solution. Of course, if
you had many different matrices that you wanted to plot, you could write
a routine that would simplify it for you =E2=80=93 producing your own
plot type so to speak.
Often it is easier, and more rewarding, to put together detailed
primitives in a custom graphic, than to try to tweak an existing WRI
=E2=80=98set-piece-plot=E2=80=99.
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
From: asitdepends at gmail.com [mailto:asitdepends at gmail.com] On Behalf Of
???
Thank you very much !
I tried your code. The plot looks very nice.
Although it's very nice, i expect more simple method to be included in
the next version of Mathematica.
2009/4/25 David Park <djmpark at comcast.net>
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/ <http://home.comcast.net/%7Edjmpark/>
From: =EC=9D=B4=EB=8D=95=EC=9E=AC [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 ?