Message Boards Message Boards

0
|
3538 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Temperature/colored plot for not rectangular domain

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:







































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




How this not rectangular domain can be "painted" with zi vals?

I.M.
POSTED BY: Ivan Morozov
For most functions, you can "paint" the colors of things using ColorFunction. 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:
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
rnddata /. {x_, y_, c_} -> {PointSize[Large], Hue[c], Point[{x, y}]}
To finish this, we wrap it in Graphics:
Graphics[rnddata /. {x_, y_, c_} -> {PointSize[Large], Hue[c], Point[{x, y}]}]
You might also consider using ListDensityPlot.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract