0
|
8578 Views
|
|
0 Total Likes
View groups...
Share
GROUPS:

# Visualisation of Elemental Map

Posted 10 years ago
 Hi,I have four datasets each representing a 256 x 256 pixel array where each pixel has an intensity value. Each dataset stands for a specific chemical element. In all four datasets the pixels are aligned and for each element the pixel can have a value between 0 and 100. So for example pixel (50,120) could have values of 20 for element A, 5 for element B, 50 for element C and 25 for element D.What I would like to do is produce a map including all four elements to give an overall 2D distribution. I would appreciate any ideas you guys have (I'm still quite new to Mathematica, so please be patient)Thanks!
 Hi Anna,If what you hve in mind is to look at the four separate maps in one graphic, here are some possibilities. Of course, Mathematica could do all sorts of computations on the data as well. For instance, you could add or average the arrays to see a composite.(* create a data set as a list of 265x256 arrays *)elements = Table[Array[RandomInteger[{0, 100}] &, {256, 256}], {4}];elementNames = {"Element A", "Element B", "Element C", "Element D"};(* plot the first one as an example *)ArrayPlot[elements[], PlotLabel -> elementNames[]] (* all four *)plots = Table[  ArrayPlot[elements[[n]], PlotLabel -> elementNames[[n]]], {n, 1, 4}] (* show the plots in a collumn *)GraphicsColumn[plots] (* show the plots in a 2x2 grid *)GraphicsGrid[Partition[plots, 2]] 