Skip to main content
2 of 3
added 98 characters in body

Adding labels on ArrayPlot and coloring rows

I need to add lables on the right from ArrayPlot for each row and color the black square of each row depending on values from two list. Color list has a numbers in some range and should be mapped using Color Scheme.

s={{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 0, 1, 1, 0}, {1, 1, 1, 1, 0, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 0, 1, 1, 0, 1, 1}, {1, 1, 0, 1, 1, 1, 1, 1, 1, 0}, {1, 1, 0, 1, 1, 1, 1, 0, 1, 1}, {1, 1, 0, 1, 1, 0, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 1, 1, 1, 0, 1, 1}, {0, 1, 1, 1, 1, 0, 1, 1, 1, 1}, {0, 1, 1, 0, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 0, 1, 1, 0, 1, 1, 0}};
ArrayPlot[s, Mesh -> True]
labels = {638/2835, 37/432, 3/40, 1/16, 1/14, 1/20, 1/16, 8/81, 1/14, 3/40, 37/432, 1/27};
colors = {638/2835, 37/432, 3/40, 1/16, 1/14, 1/20, 1/16, 8/81, 1/14, 3/40, 37/432, 1/27};