To my mind there are four ways of making the array plot with the BrownCyanTones gradient and a bar legend that seem reasonable.
Data range -1 to 1, plot range -1 to 1, lengend range -1 to 1
SeedRandom[1];
ArrayPlot[RandomReal[{-1, 1}, {10, 10}],
ColorFunction -> "BrownCyanTones",
PlotLegends -> BarLegend[{"BrownCyanTones", {-1, 1}}]]
Data range -5 to 1, plot range -5 to 1, lengend range -5 to 1
SeedRandom[1];
ArrayPlot[RandomReal[{-5, 1}, {10, 10}],
ColorFunction -> "BrownCyanTones",
PlotLegends -> BarLegend[{"BrownCyanTones", {-5, 1}}]]
Data range -1 to 1, plot range -1 to 1, legend colors taken from the upper part of BrownCyanTones
SeedRandom[1];
ArrayPlot[RandomReal[{-1, 1}, {10, 10}],
ColorFunction -> ColorData[{"BrownCyanTones", {-1, 1}}],
PlotLegends -> BarLegend[{ColorData[{"BrownCyanTones", {-1, 1}}], {-1, 1}}]]
Data range -1 to 1, plot range -5 to 1, lengend range -5 to 1
SeedRandom[1];
ArrayPlot[RandomReal[{-1, 1}, {10, 10}],
ColorFunction -> ColorData[{"BrownCyanTones", {-1, 1}}],
PlotRange -> {-5, 1},
PlotLegends -> BarLegend[{"BrownCyanTones", {-5, 1}}]]
I can't figure out from your question which of these is what you are after, but one of them should work. They all have the property that the bar legend colors match the plot colors.
PlotLegends
and even explictly includesBarLegend
in in the list. The OP has used a valid option and a valid expression for the option and has not gotten the expected result. $\endgroup$