maps contourf, griddatat or scatterdata
1 view (last 30 days)
Show older comments
Hello
I'am trying to replot may hardness mesurement that i get from the machine
I get three data vector x, y, and h
the maps that i get from the machine is like the one below
when i replot the data with matlap i get the one below
Could anyone please give me ideas how to replot the data to get better resoltion and interpolation
thanks in adavanced
2 Comments
John D'Errico
on 25 Feb 2023
I think too many get spoiled by tv shows and movies, where starting with a massively blurred picture about 3 pixels wide, they sharpen it in second, to then be able to read a license plate through a mirror, as well as the face of the perpetrator, complete with a tiny mole on their face and to know the color of their eyes.
Exactly what do you think should be the result of this hoped for resolution improvement? The plots you show seem reasonable, and consistent.
Accepted Answer
William Rose
on 25 Feb 2023
I assume you have data at the specific points shown on the Matlab plot. If that is true, then the Matlab plot looks very good to me.
Use interp2() to interpolate your original data to a finer grid. Then use contourf() on the interpolated data set.
Since your samples do not cover a full rectangular grid, use the extrapval argument to interp2(), to specify the value to use outside the sampled area.
The sampled points are not on a grid aligned with the plotted x and y, and points in the corners and along one edge are not sampled. Therefore you will have to use the "scattered points" way of specifying the measured data when you call interp2() - see here.
Try different "methods" with interp2(): maybe you will like the visual appearance of the contours more with certain methods.
I suspect you will get good help on this if you post the data file and the code you used to generate the plot.
More Answers (0)
See Also
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!