Time Series Charts - date stamps interpreted as integers

Kostadin Atanasov <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CAFVqmBouhQDCBU-F-q+kVW_pTfAD+yGbtRd6GMcYX_vEis0zVg@mail.gmail.com>
Looking for help with the following issue:

My line plot distorts the data, as it interprets the timestamps as
integers, i.e.:

20170227
20170228
20170301

While the distance between all three is 1 day, in integer terms the picture
is different:
- the distance between 20170227 and 20170228 is 1
- the distance between 20170228 and 20170301 is 73

As a result the line plot is distorted (stretched) at the points where the
month changes.

One possible solution is to use line chart, which has equispaced
categorical x-axis, however it accepts only ordered data points that start
with the very first category point. This doesn't work if:
- the two series are not perfectly aligned (e.g. one data series starts
several days later)
- or I have gaps in the data (which is normal, I just want gap in the graph
too)

Another possible solution is to still use the line plot, but instead of
integer representation of the dates, I put sequential integers, e.g.
0,1,2,3,4, etc. The problem is I cannot replace those values with custom
x-axis tick labels for presentation.

All examples given for time series include end-of-month dates, which is
fine, because they have roughly similar distance. Simply I am looking for
daily granularity

I read all possible documentation and forums but could not find a clear
answer to this issue.

Your help is much appreciated

KA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.