DateY charts

DateY charts work the same as any XY chart, with one exception. Each data point is associated with a date, not a string type in Python with a date but a physical datetime object in our Python code. Each X label will be associated with a date object in our Python code, and Y will either be an integer or a float supplied by us.

Unlike our scatter plots, DateY does include its own function with its own rules to be followed. Let's build a very simple DateY chart to see what we are dealing with. Firstly, before running the following code, take a look at the datetime library, specifically datetime and timedelta.

The datetime library is a built-in library for Python and is pretty straightforward. It allows dates to be saved to code from the ...

Get Learning Python Data Visualization now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.