Working with Date Axes
Financial charts and epidemiological curves often use Dates on the X-axis. Dates are just linear numbers formatted differently.
The Unix Epoch Solution
The easiest way to extract date-based data is to calibrate the axis using days or years, then convert them later. However, dates aren't perfectly linear (leap years, unequal months).
Best Practice Method
- Identify two distinct dates on the X-axis (e.g., Jan 1, 2020 and Jan 1, 2024).
- Instead of entering the date string, convert these to Julian days, or simply treat the first date as `0` and calculate the exact number of days to the second date (e.g., `1461`).
- Calibrate X1 as `0` and X2 as `1461`.
- Extract your data points.
- Use our Date Axis Parser tool to add the extracted day-offsets back to your base date (Jan 1, 2020) to generate ISO 8601 strings.
Handling Trading Days vs Calendar Days
Stock charts often skip weekends. If you extract linearly across a stock chart, a gap over the weekend will look continuous, distorting the time scale. You must use tools like pandas in Python post-extraction to re-index the data against a business calendar (BDay).