Guest User

Untitled

a guest
Nov 12th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. values = {1534, 1404, 1484, 1564, 1414, 1464, 1534, 1454, 1414, 1444,
  2. 1584, 1534, 1604, 1474, 1554, 1484, 1414, 1484, 1604, 1474, 1484,
  3. 1826, 1856, 1806, 1916, 1826, 1786, 1906, 1846, 584, 724, 544, 644,
  4. 1409, 1309, 1659, 1389, 1359, 1389, 2400, 1389, 2400, 2650, 3550,
  5. 3550, 3500, 1409, 1289, 1559, 1409, 1609, 1409, 1339, 1409, 1609,
  6. 2874, 1609, 4000, 4450, 4000, 3770, 4000, 2500, 2650};
  7. mat = Partition[values, 8, 8];
  8.  
  9. colours = Reverse[{Red, Yellow, Green, Cyan, Blue, Magenta}];
  10. z1bound = 1000;
  11. z2bound = 5000;
  12. colourfunc =
  13. Function[Blend[Reverse[{Red, Yellow, Green, Cyan, Blue, Magenta}],
  14. Rescale[#, {z1bound, z2bound}]]];
  15.  
  16. ArrayPlot[mat /. x_ /; (x < 1000 || x > 5000) :> White,
  17. ColorFunction -> colourfunc, ColorFunctionScaling -> False]
  18.  
  19. ArrayPlot[mat ,
  20. ColorFunction ->(If[# < 1000||# > 5000, White, colourfunc @ #]&),
  21. ColorFunctionScaling -> False]
Add Comment
Please, Sign In to add comment