From my SIMS I can export the image mappings in form of a two column ASCII file. For example if it were a 5x5 pixel mapping, it would give something like this:
{{0, 0}, {1, 10}, {2, 20}, {3, 30}, {4, 40}, {5, 50}, {6, 60}, {7,70},{8, 80}, {9, 90}, {10, 100}, {11, 110}, {12, 120}, {13, 130}, {14, 140}, {15, 150}, {16, 160}, {17, 170}, {18, 180}, {19, 190}, {20, 200}, {21, 210}, {22, 220}, {23, 230}, {24, 240}}
whereas the first column represents the pixel and the second column the counted events at that position. The image is rastered from left to right going downwards, so the first row are pixels 0-4, the second one 5-9 and so forth.
Now I want to plot this as the 5x5 pixel mapping as it was recorded. How would I go about that? I find it hard to rearrange the list back into the 5x5 format to begin with. Additionally the number of events should correspond to certain colors (just like a heat map). Thanks!
Image[Partition[pix, 5], ImageSize -> 400]
where pix is the data you show. !Mathematica graphics $\endgroup$ArrayPlot[Partition[list[[All, 2]], 5]]
? $\endgroup$[[All, 2]]
first, forgot about the first element is not part of data. $\endgroup$