The basics of charting with Python
There are many libraries that implement charting with Python but at the time of writing, two of them are industry standards – matplotlib
and plotly
:
- Matplotlib is the oldest charting library (in heavy use since 2003), which was created in order to bring the well-developed charting facilities of Matlab to Python. It can create charts based on any array-like objects, including native Python lists and
numpy
arrays, support numerous types of charts, including financial ones (which is what we need!), provides full control over chart objects, features almost unlimited chart customizations, and can be used with different backends. - plotly is a relatively young competitor (released in 2014). It offers pretty much the same charting facilities as
matplotlib
so the choice between the two is not obvious. Plotly definitely wins when it comes to interactivity and working with chart objects via an API but loses the competition in speed and abilities...