How to make an interactive plot that would show timeseries data on a spatial map?
古いコメントを表示
I would like to make an interactive plot in such a way that it has the desired spatial points on a lat-long plot and upon clicking a point on the lat-long space using the mouse it would show the timeseries data of a variable at that particular point. I can, of course, plot the spatial points and the timeseries but I am having trouble finding ways to connect the two plots into one.
P.S. - I realize a simple animation would be an easier way but I do not want to do that.
回答 (1 件)
KSSV
2018 年 11 月 8 日
[X,Y,Z] = peaks(100) ;
h1 = figure(1) ;
subplot(211)
pcolor(X,Y,Z) ;
shading interp
while true
[x,y] = getpts(h1) ;
% Do interpolation/ selection get the time series for x,y
subplot(212)
plot(rand(100,1)) ;
title(sprintf('x = %f,y=%f',x,y))
end
カテゴリ
ヘルプ センター および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!