Plot .grd file
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 24 Feb 2019
I had no difficulty using grdread2() with that file.
P_L
il 25 Feb 2019
Walter Roberson
il 25 Feb 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
il 28 Feb 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()
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Mapping Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
