pcolorm ignores lines of data
조회 수: 4 (최근 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!