# Temperature/colored plot for not rectangular domain

**URL:** <https://community.wolfram.com/t/temperature-colored-plot-for-not-rectangular-domain/1686>\
**Category:** Questions\
**Tags:** mathematica, graphics-and-visualization\
**Created:** [March 10, 2014, 8:27pm UTC](https://community.wolfram.com/t/temperature-colored-plot-for-not-rectangular-domain/1686 "2014-03-10T20:27:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamorozov1](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/iamorozov1/32/17701_2.png) [@iamorozov1](https://community.wolfram.com/u/iamorozov1)\
**Post date:** [March 10, 2014, 8:27pm UTC](https://community.wolfram.com/t/temperature-colored-plot-for-not-rectangular-domain/1686/1 "2014-03-10T20:27:54Z")

</div>

Hi,

I have a list of the form **{{x1,y1,z1},{x2,y2,z2}, … }** where xi and yi form rectangular n x n domain.  
In this case **ArrayPlot[]** gives me what I need:

 ![plot1.png](https://global.discourse-cdn.com/wolfram/original/2X/d/d081cbead335477d0ecbc10b53ee51fa7538e2c1.png)

Then there is a function that transforms xi and yi into:

 ![plot2.png](https://global.discourse-cdn.com/wolfram/original/2X/c/c9deaa83be731bce56bcbb441ae64eac53121d09.png)  
How this not rectangular domain can be “painted” with zi vals?

I.M.

---

<div class="post-metadata">

**Author:** ![seanc](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/seanc/32/34005_2.png) [@seanc](https://community.wolfram.com/u/seanc)\
**Post date:** [March 11, 2014, 12:19am UTC](https://community.wolfram.com/t/temperature-colored-plot-for-not-rectangular-domain/1686/2 "2014-03-11T00:19:09Z")

</div>

For most functions, you can “paint” the colors of things using [ColorFunction](http://reference.wolfram.com/mathematica/ref/ColorFunction.html). Sometimes it takes effort to define the ColorFunction. In this case, it’s a bit annoying. I would suggest just drawing the points with Graphics Primitives

Here’s some example data:

```auto
rnddata = RandomReal[1, {50, 3}]

```

We need to turn the first two numbers of each triple into a Point and the last number into a Hue preceeding that Point

```auto
rnddata /. {x_, y_, c_} -> {PointSize[Large], Hue[c], Point[{x, y}]}

```

To finish this, we wrap it in Graphics:

```auto
Graphics[rnddata /. {x_, y_, c_} -> {PointSize[Large], Hue[c], Point[{x, y}]}]

```

You might also consider using [ListDensityPlot](http://reference.wolfram.com/mathematica/ref/ListDensityPlot.html).
