Open mingzhou opened 9 years ago
Hey!
Currently bdscale
only does a business date scale...hence the name. You're asking for a business time scale, which is the same concept but with a couple additional restrictions.
So the short answer is no, it can't.
In order to get it to work though, you'd just need to implement two functions:
transform
: given an actual time t
in some time format like POSIXct
, return an integer or double bt
representing how long t
occurred after some point in time epoch
on your business-time scaleinverse
: given a bt
, how do I get a t
For transform
you'd need to know:
business.dates
like you do for bdscale
to account for weekends and holidaysThat would make it work. To make it pretty, you'd also need to implement a function that determines where to put the grid lines.
Hi, if I want to plot financial data in minute-scale, can I remove non-trading minutes to get a continuous axis scale? Thank you!