pcolorm ignores lines of data
2 次查看(过去 30 天)
显示 更早的评论
I try to plot data. Unfortunately, the region is the composition of three single maps. The edges of these maps seem to produce funny effects as can be seen in the figure.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352805/image.png)
The data set is continuous, but nevertheless by zooming in some data seems to miss.
These plots are produced by using pcolorm(lat,lon,field). Below, the last picture shows the same data set plotted with plotm, to check that the data is existing.
How can i fix this?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352808/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/352811/image.png)
I am using matlab 2019a
0 个评论
采纳的回答
Bjorn Gustavsson
2020-8-28
The way I've understood pcolor (which I assume pcolorm is a modification of) makes a colour-patch with corners at [x(n,m),y(n,m)],[x(n+1,m),y(n+1,m)],[x(n+1,m),y(n+1,m+1)] and [x(n,m+1),y(n,m+1)], using the intensity/color from Z(n,m) (this is using shading 'flat'). Sometimes that is an OK behaviour. However when I have some small-sized data that I considere centred at the coordinate-points I have to adjust the input to pcolor to take into account the function's behaviour by repeating the last row and column of the data and modify the [x,y] coordinates by shifting a "half dx and a half dy" and add a last column and row to both. Maybe that's part of your missing-data problem?
HTH
5 个评论
Bjorn Gustavsson
2020-8-28
Anna, I can imagine that when you try to merge the data you will run into problems with the different data-sets having different sizes? If that's the case you might get somewhere by using scatteredInterpolant - but this would be a bit of a cumbersome detour. Another option might be to use scatterm instead of pcolorm, it might work OK - primarily if you're currently in a "facing a deadline and something gots to work now" situation.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geographic Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!