point or marker on contourfm plot.
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ahmed shaaban
le 15 Mar 2014
Réponse apportée : ahmed shaaban
le 16 Mar 2014
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
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Object Properties dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!