How to hide the grid lines behind a marker in map axes using GRIDM function in Mapping Toolbox 3.2 (R2010b)?

3 次查看(过去 30 天)
When I use GRIDM for a map containing a marker, the grid lines appear in front of the marker.
axesm('pcarree','MapLatLimit',[-90 90],'MapLonLimit',[-90 90]);
gridm
plotm(0,0,'o','markersize',18,'markerfacecolor','g');
I want to hide the grid lines behind the marker.

采纳的回答

MathWorks Support Team
The grid lines appear in front of the marker as the default ‘ZData’ property of grid lines is positive. Set the ‘ZData’ values of grid lines to be negative.
axesm('pcarree','MapLatLimit',[-90 90],'MapLonLimit',[-90 90]);
Hg = gridm;
plotm(0,0,'o','markersize',18,'markerfacecolor','g');
% Get the size of 'Zdata'
Z1n=size(get(Hg(1),'ZData'));
Z2n=size(get(Hg(2),'ZData'));
% set the ‘ZData’ values to -1
set(Hg(1),'ZData',-ones(Z1n));
set(Hg(2),'ZData',-ones(Z2n));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Fit Postprocessing 的更多信息

产品


版本

R2010b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by