How to fill the gaps in a patch plot through adaptive interpolation
Show older comments
I have a 2 dimensional patch plot that looks like this where the colors represent magnitude of flow rate so basically I have x position, y position and magnitude of flow rate for each of the patches you see.

Is there any way I can fill in the entire area (within the red lines in the below image )through some sort of adaptive interpolation of particular connectivity so it does not fill up the entire image?

Thanks in advance!!!
7 Comments
KSSV
on 3 Sep 2020
Try Griddata, scatteredinterpolant.
J. Alex Lee
on 3 Sep 2020
but i'm not sure that the red curves correspond to any kind of human-interpolation scheme my eye could apply on the data points...what "rule" in english do you imagine to define the positions making up the red curve??
AAS
on 3 Sep 2020
J. Alex Lee
on 3 Sep 2020
AAS, it seems to me your question is about how to define the location of the red curves...in what sense do they not matter as much?
AAS
on 3 Sep 2020
J. Alex Lee
on 3 Sep 2020
so you are not asking to fill in the space between the red curves with a single color, but you want the region between the red curves to be a patchwork of color, informed by the small patches you already have in there?
AAS
on 3 Sep 2020
Answers (2)
J. Alex Lee
on 3 Sep 2020
0 votes
You could add in "corners" where your red curves intersect the y-axes as new (x,y) coordinates, then do a convexhull on them. That should create a "tight" blanket around your points.
If you can then identify those points along the top edge vs bottom edge (in this case maybe above and below mean y-value?) you can shift or stretch the appropriate y-coordinates up and down appropriately.
Could it work?
2 Comments
J. Alex Lee
on 4 Sep 2020
edit: this answer is for drawing a single colored band indicated by something like the red curves in the question, it does not answer the actual question.
AAS
on 4 Sep 2020
J. Alex Lee
on 4 Sep 2020
0 votes
If you reduce your current patches into single (x,y) coordinates, e.g., center of mass, then you can triangulate/find the voronoi diagram of them
And hopefully be able to use that as a basis to create the patches you are looking for
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!