Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack.
matplotlib.dates.drange() function returns a sequence of equally spaced Matplotlib dates. The date range starts from ‘dstart’ and go up to, but not including ‘dend’. The space between each date is called delta.
Syntax: matplotlib.dates.drange(dstart, dend, delta)
- dstart: Starting point of the date range and is a python’s datetime date.
- dend: Ending point of the date range and is a python’s datetime date.
- delta: It represents the spacing between each dates and belongs to python’s datetime.timedelta.
Returns: It returns a numpy array which is a list of floats representing Matplotlib dates.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.