Message Boards Message Boards

1 Reply
0 Total Likes
View groups...
Share this post:

Visualisation of Elemental Map

Posted 11 years ago

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)

POSTED BY: Anna Regoutz
Posted 11 years ago
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[[1]], PlotLabel -> elementNames[[1]]]

(* all four *)
plots = Table[
  ArrayPlot[elements[[n]], PlotLabel -> elementNames[[n]]], {n, 1, 4}]

(* show the plots in a collumn *)

(* show the plots in a 2x2 grid *)
GraphicsGrid[Partition[plots, 2]]

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract