I think that your problem is related to the fact that your array is actually a vector. If you use Automatic
in FrameTicks
you get this:
But you can apply this workaround:
ArrayPlot[Thread@{Range[0, 1, 0.01]}, AspectRatio -> 4,
ColorFunction -> "Rainbow", PlotRange -> {{0.`, 1.`}, {0.`, 1.`}},
FrameTicks -> {{None, {{.5, 75}, {.7, 100}, {.9, 125}, {1.1, 150}, {1.3, 175},
{1.5, 200}}}, {None, None}}, Frame -> True,
PlotRangePadding -> 0,
BaseStyle ->
Directive[Opacity[1], FontFamily -> "Bitstream Charter", 10],
ImageSize -> {Automatic, 100}]
Update
To get your gradient you have to remove the PlotRange
and then specify a new set of ticks.
ArrayPlot[Thread@{Range[0, 1, 0.01]}, AspectRatio -> 4,
ColorFunction -> "Rainbow",
FrameTicks -> {{None, {{1, 75}, {20, 100}, {40, 125}, {60, 150}, {80,
175}, {100, 200}}}, {None, None}}, Frame -> True,
PlotRangePadding -> 0,
BaseStyle ->
Directive[Opacity[1], FontFamily -> "Bitstream Charter", 10],
ImageSize -> {Automatic, 100}]
PlotRange -> {{0.
, 1.}, {0.
, 1.}}
. $\endgroup$PlotRange
works insideArrayPlot
andMatrixPlot
is quite different from what we have come to expect based on standard usage patterns inside otherGraphics
objects. So, instead of removingPlotRange
you can also usePlotRange->{All,All,{0.,.1}}
. See other interesting examples in theArrayPlot>>Options>>PlotRange
$\endgroup$PlotRange -> {All, All, {0, 1}}
$\endgroup${0.,1.}
:) $\endgroup$