In matrix visualization, for instance,
MatrixPlot[{{1, 2}, {3, 4}}, PlotRangePadding -> 0,
ColorFunction -> "Rainbow"]
the color map does not cover the whole color range as shown in the following density plot.
DensityPlot[x, {x, 1, 4}, {y, 0, 0.1}, AspectRatio -> 0.2,
PlotRangePadding -> 0, ColorFunction -> "Rainbow", Frame -> True,
FrameTicks -> None]
I need to add the density plot as a color bar, while not using the Legend. So, how to solve this problem?