# time series plot on google earth using matlab

I have three sets of data:

- time
- longitude
- latitude

I would like to plot this on google earth using google earth toolbox for matlab, what i need is when i move the time slider a line should be drawn on google earth.

I tried this

x = [longitude, latitude]; y = time; kmlStr = ge_plot(x,y);

But an error occured. On the other hand ge_gplot does not make sense for this.

Is there a way i can do this timeseries plot using google earth toolbox?

## Answers

Create two vectors: one for x (longitude), one for y (latitude). ge_plot(x,y) will draw a line connecting each pair of (x,y) points in these vectors.

If you want to draw the line as a slider advances, then you need to make use of a callback function. In this function, do ge_plot(x(1:ind), y(1:ind) ) where ind is determined by the "time" value of the slider.