I have a simple graphics which display a polygon and a bar legend. I am having difficulties defining a range of values for my bar legend. What I am looking to get is 4 values: 10^-10, 10^-6, 10^-3, 10^-1 (Green>Amber>Red);
Ultimately I would like to control my polygons color filling using bar legend as a controller. Here is what I have at present:
Manipulate[
Row[
{BarLegend[{{Green, Yellow, Red}, {10^-10, 10^-1}},
LegendLayout -> "Column"],
Graphics[
Polygon[{{-1, 1}, {0, -1}, {1, 1}},
VertexColors -> {Red, Green, Red}], PlotRange -> 1,
ImageSize -> {220, 220}]
}
]
, {{x, .0, "Level:"}, 0, 1, .1, ImageSize -> Medium},
ControlPlacement -> Bottom] (*Controller for filling goes here *)
I was wondering if anyone would be able to help me out to figure out how to set the appropriate range for my BarLegend and perhaps to give me some pointers on how could I achieve filling my Polygon using BarLegend as a control or some similar structure.
Regards,