I use Hue
to color ArrayPlot
:
Needs["PlotLegends`"]
GraphicsRow[{
ArrayPlot[gridmatrixpair, Mesh -> False,
ColorFunction -> (
Which[2.0 < #[[1]] < 4.9 && 3*10^8 > #[[2]] > 1*10^6,
Hue[(#[[2]] - 1*10^6)*3.344*10^-9],
True, White
] &),
ColorFunctionScaling -> False, AspectRatio -> 2/7,
FrameLabel -> {y, x}
],
Graphics[
Legend[ColorData["Rainbow"][1 - #1] &, 10, "10^6", "10^8",
LegendShadow -> None, LegendLabel -> "Power (a.u.)"]]
}]
But as you see the colors in ArrayPlot
are brighter than the rainbow colors for the legend. I did not find another ColorData
object with brighter colors. What can I do, the scale is changing on and on for different notebooks, so the scale spectrum should be part of the Legend
object.
PlotLegends`
package has been superseded by built in functionality in v9, you are not using the same color distribution inArrayPlot
as you are inLegend
. Have you actually tried usingHue
inLegend
? You may have toRescale
it, but that shouldn't be an issue. Truthfully, though, if you are using v9, use thePlotLegends
option, it is wholly superior to thePlotLegends`
package. $\endgroup$