How to make an interactive plot that would show timeseries data on a spatial map?
4 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
KSSV
on 8 Nov 2018
[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
See Also
Categories
Find more on Graphics Object Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!