point or marker on contourfm plot.

15 次查看(过去 30 天)
Hello I am trying to add some point marker on contour plot using the following command.
if true
hold on;plot(37,12,'.r', 'markersize', 10);
end
and it works fine , but when i use it with contourfm it didnot wrok and the contour squeeze. I attached two figures showing that , the first before I put the marker and the second after I put the marker.
here is my code
if true
clc
diri='/data/'
filename='msl_t2m.nc'
file=[diri filename]
% ncread is the latest high level matlab commands
ncdisp(file)
lat =ncread(file,'latitude')
long =ncread(file,'longitude')
time =ncread(file,'time')
msl = ncread(file,'msl',...
[1 1 1],[length(long) length(lat) length(time)],[1 1 1]);
msl=msl./100.;
fprintf('%f %f %f\n',min(msl(:)),max(msl(:)),mean(msl(:)))
%%plotting the data
%contourf(long,lat,msl(:,:,100)');
%colorbar
%%adding map
latlim = [-90 90];
lonlim = [-180 180];
figure('Color','white')
axesm('eqdcylin','MapLatLimit',latlim,'MapLonLimit',lonlim, ...
'Frame','on','Grid','on','MeridianLabel','on', ...
'ParallelLabel','on')
axis off
coast = load('coast.mat');
plotm(coast.lat,coast.long)
gLat = lat(1):-0.75:lat(length(lat));
gLon = long(1):0.75:long(length(long));
[ggLat,ggLon] = meshgrid(gLat,gLon);
contourfm(squeeze(double(gLat)),squeeze(double(gLon)),msl(:,:,100)')
plotm(coast.lat,coast.long)
end
I have attached the file on the following link . https://www.dropbox.com/s/tzqn774c23v3jmj/msl_t2m.nc thanks in advance

采纳的回答

ahmed shaaban
ahmed shaaban 2014-3-16
I found solution in the user guid the solution is to use the command textm
if true
textm(6,30,'.wdfdfdfd');
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by