matplotlib 3.5.1

ParametersBackRef
set_epoch(epoch)

The default epoch is dates.epoch (by default 1970-01-01T00:00).

If microsecond accuracy is desired, the date being plotted needs to be within approximately 70 years of the epoch. Matplotlib internally represents dates as days since the epoch, so floating point dynamic range needs to be within a factor of 2^52.

~.dates.set_epoch must be called before any dates are converted (i.e. near the import section) or a RuntimeError will be raised.

See also /gallery/ticks/date_precision_and_epochs .

Parameters

epoch : str

valid UTC date parsable by numpy.datetime64 (do not include timezone).

Set the epoch (origin for dates) for datetime calculations.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.dates.num2date matplotlib.dates matplotlib.dates.date2num matplotlib.dates.set_epoch

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/dates.py#260
type: <class 'function'>
Commit: