point or marker on contourfm plot.

조회 수: 14 (최근 30일)
ahmed shaaban
ahmed shaaban 2014년 3월 15일
답변: ahmed shaaban 2014년 3월 16일
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