Skip to main content
Commonmark migration
Source Link

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

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}}]]

plot1

###Data range -5 to 1, plot range -5 to 1, lengend range -5 to 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}}]]

plot2

###Data range -1 to 1, plot range -1 to 1, legend colors taken from the upper part of BrownCyanTones

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}}]]

plot3

###Data range -1 to 1, plot range -5 to 1, lengend range -5 to 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}}]]

plot4

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.

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}}]]

plot1

###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}}]]

plot2

###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}}]]

plot3

###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}}]]

plot4

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.

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}}]]

plot1

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}}]]

plot2

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}}]]

plot3

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}}]]

plot4

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.

Source Link
m_goldberg
  • 108.2k
  • 16
  • 104
  • 259

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}}]]

plot1

###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}}]]

plot2

###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}}]]

plot3

###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}}]]

plot4

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.