I need to know how to create a contour plot that changes with time.

I have a 3 column vectors of Latitude, Longitude and Total Electron Content(TEC) having domensionality of 86400x1. I have created contour plot that gives the coordinate dependant distribution of the TEC. Using the following code
lat=IPP(:,1); %% IPP is the matrix whose 1st column is latitude
lon=IPP(:,2); %% IPP is the matrix whose 2nd column is longitude
tec=VTEC(:,1);
[xq,yq]=meshgrid(min(lat):.1:max(lat),min(lon):.1:max(lon));
[X,Y,Z]=griddata(lat,lon,tec,xq,yq);
%%Contour plot of VTEC
contourf(X,Y,Z,100,'linestyle','none');
xlabel('Latitude');
ylabel('Longitude');
Now I need to know how to push this plot into the fourth dimension by showing the time evoltuon of the contour plot. The data was recorded over a 24 hour interval with a frequency of 1 Hertz.

Réponses (1)

Update the contour plot properties from the 2nd data.
Check this example:
clear; clc;
t = 1:10;
for k = 1:10
x = linspace(-2*pi,2*pi);
y = linspace(0,t(k)*pi);
[X,Y] = meshgrid(x,y);
Z = sin(X) + cos(Y);
if k == 1
[M,c] = contourf(X,Y,Z,10);
else
c.XData = X; % Update X
c.YData = Y; % Update Y
c.ZData = Z; % Update Z
end
pause(1);
end

Catégories

En savoir plus sur Contour Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by