point or marker on contourfm plot.

13 ビュー (過去 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 Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by