Sliding Window x-axis

191 Views Asked by At

I already do sliding window in order to calculate some parameters of networks. In this case, I'm working with a financial network based in daily returns of 140 companies.

I already have all my calculations, but when I plot my results I obtain the number of sliding movements ("Sliding Steps") in my x-axis, but instead of steps I need years in my x-axis.

In order to change the values of x-axis, I applied the same procedure ("sliding window") but in this case, only for a vector of years and then I calculated the "mode" of each "window" I obtain a 1124 x 1 array that contains the years of each window. How i can change those "steps" by "years" in the array?

1

There are 1 best solutions below

0
On

You are looking for the axis-properties XTick and XTickLabel of Matlab plots. The documentation by Mathworks provides a useful example at http://www.mathworks.de/de/help/matlab/creating_plots/setting-axis-parameters.html#f6-29060

Instead of the values in the interval of -pi/2 to pi/2 you want to place the years.