plotting sparce time with matplotlib
I want to plot a trading timeseries, e.g. close of 5 min bars. The markets are closed over night. So I have two queries:
How to plot time in MatPlotLib (as well as date). E.g. so I need to implement a new axis or new hourLocators etc.
How to remove overnight gaps from my plot. I.e. I want the last bar on Monday evening to be visually cont开发者_如何转开发iguous with the first bar of Tuesday morning. (Multiple plots won't work here as I need to display several days and pan the view.)
Look at this example. It skips weekend gaps in a series of daily data and is very easy to adapt to your case.
精彩评论