How to remove missing/non existing days in a graph?

5 views (last 30 days)
Pierre Lonfat
Pierre Lonfat on 12 Mar 2018
Answered: dpb on 12 Mar 2018
The documentation I have found on the forum is only about removing the NaN which is not my case.
Here, the missing days are added automatically...
I do not have any NaN in my time series as you can see on the screen shot. But matlab is still adding non existing days in the graph so that I have about 30 days a month I guess...
Any idea how I can remove these very annoying gaps? Thank you very much in advance.
if true
title('Long-term model','FontSize',24);
ylabel('Indice and Risk premium evolution','FontSize',18);
leg=legend('Index','Rolling 89D','Rolling 144D','Momentum','location','northwest');
grid on;

Answers (1)

dpb on 12 Mar 2018
This ? appears closely related to <Plot-financial-data-continuously-in-time>. There's one solution given by Peter and I made a suggestion of how one might approach it more generically there. Unfortunately, if the nonstatic version doesn't serve your needs either I've yet to (and am unlikely to in the near future) have time to do anything along those lines.
This has come up a number of times; it appears common-enough for financial data that folks with the need should start submitting enhancement requests -- one presumes such would likely find their way into Financial TB first but it does seem like a general facility would be useful for any weekday time series that is reasonably prevalent throughout business world.

Community Treasure Hunt

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

Start Hunting!

Translated by