pcolorm ignores lines of data
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anna S
am 28 Aug. 2020
Kommentiert: Anna S
am 28 Aug. 2020
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.
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?
I am using matlab 2019a
0 Kommentare
Akzeptierte Antwort
Bjorn Gustavsson
am 28 Aug. 2020
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 Kommentare
Bjorn Gustavsson
am 28 Aug. 2020
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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Orange finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!