0
$\begingroup$

I have a list of triple data. I want to plot them in this manner that

  1. The first element to be considered a point in the x-axis.
  2. The second element to be considered a point in the y-axis.
  3. The third element to be considered as a color pixel in the XY-plane at (x,y) (the first element, the second element).

The spectrum of the colors used in the plot should be described in the description of the plot. How can I plot such a figure?

Here is my data:

data={{84, 60, 22.8591}, {84, 61, 8.74741}, {84, 62, 15.5119}, {85, 62, 18.525}, {86, 62, 23.3424}, {84, 63, 6.31806}, {85, 63, 6.67302}, {84, 64, 9.35025}, {85, 64, 5.90417}, {86, 64, 13.752}, {87, 64, 7.02938}, {88, 64, 21.5328}, {84, 65, 4.17085}, {85, 65, 4.09691}, {86, 65, 4.80203}, {87, 65, 4.79934}, {84, 66, 2.63347}, {85, 66, 3.02938}, {86, 66, 3.93298}, {87, 66, 4.36173}, {88, 66, 13.9777}, {84, 67, 1.54654}, {85, 67, 2.20898}, {86, 67, 2.08279}, {87, 67, 2.84856}, {91, 67, 2.83123}, {84, 68, 1.01284}, {85, 68, 1.56937}, {86, 68, 2.35025}, {87, 68, 2.50515}, {88, 68, 3.06819}, {84, 69, 0.170262}, {85, 69, 0.90309}, {86, 69, 1.33445}, {87, 69, 1.92324}, {83, 70, 0.623249}}
$\endgroup$
  • $\begingroup$ Looks like a perfect job for ListDensityPlot. $\endgroup$ – Marius Ladegård Meyer Aug 22 '18 at 19:19
  • $\begingroup$ scale = 1/Max[data[[All,3]] ]; Graphics[{ColorData["Rainbow"][scale #3], Point[{#1,#2}]}& @@@ data] (untested) $\endgroup$ – Szabolcs Aug 22 '18 at 19:22
  • $\begingroup$ {{xmin, xmax}, {ymin, ymax}, {zmin, zmax}} = MinMax /@ Transpose[data]; vals = SparseArray[{#, #2} -> #3 & @@@ data][[xmin ;; xmax, ymin ;; ymax]]; MatrixPlot[vals, DataRange -> {{xmin, xmax}, {ymin, ymax}}] $\endgroup$ – C. E. Aug 22 '18 at 20:32
  • $\begingroup$ Thank you so much for your suggestions. But I need these colorful pixels in a coordinate. $\endgroup$ – AYBRXQD Aug 23 '18 at 5:58
0
$\begingroup$

We can use @Szabolcs approach

    scale = 1/ Max[data[[All, 3]]];
 Graphics[{ColorData["ThermometerColors"][scale #3], Rectangle[{#1, #2}]} & @@@ data, Frame -> True]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you dear Okkes Dulgerci $\endgroup$ – AYBRXQD Aug 23 '18 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.