Plot .grd file
Afficher commentaires plus anciens
Hi there, I am relatively new to matlab and am using it for a very important project. I am hoping to use a .grd file to plot a topographic map of a major fault in Turkey and some data (my results) over it. However, I am really struggling to plot the .grd file in Matlab - I have tried grdinfo2 and grdread2 but i keep getting errors.
I have tried youtube and looking on here for relevant documentation but can't get anything to work. If anyone would be so kind as to help/ advise it would be very much appreciated.
Many thanks
5 commentaires
Walter Roberson
le 24 Fév 2019
I had no difficulty using grdread2() with that file.
P_L
le 25 Fév 2019
Walter Roberson
le 25 Fév 2019
I used
[X, Y, Z] = grdread2('FileNameWasHere.grd');
surf(X, Y, Z, 'edgecolor', 'none');
You could
[X, Y, Z] = grdread2('FileNameWasHere.grd');
h = pcolor(X, Y, Z);
h.EdgeColor = 'none';
When you have a high enough density of data in an axes, then the black edge between cells can end up turning the whole graph black, because it is fixed width but the cell sizes gets smaller to fit in the axes.
Walter Roberson
le 28 Fév 2019
shadem() would be for the Mapping Toolbox; some of the routines you are using such as plot() are not appropriate if you are working with a mapping axes. If you are using a mapping axes then you should use surfm() instead of pcolor(), and plotm() instead of plot()
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Mapping Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
