1

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 contiguous with the first bar of Tuesday morning. (Multiple plots won't work here as I need to display several days and pan the view.)

1 Answer 1

3

Look at this example. It skips weekend gaps in a series of daily data and is very easy to adapt to your case.

Sign up to request clarification or add additional context in comments.

2 Comments

How did you end up adapting this to skip overnights?
One point per five minute bar + custom label place where I wanted them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.