Learning more about matplotlib for Chart Generation
In this recipe, we will dive deeper into a core charting library in Python. We’ll revisit our vaccine data and make some beautiful charts!
Matplotlib is the most common Python library for generating charts. There are more modern alternatives, such as Bokeh, which is web-centred, but the advantage of matplotlib is not only that it is the most widely available and widely documented chart library but also, in the computational biology world, we want a chart library that is both web- and paper-centric. This is because many of our charts will be submitted to scientific journals, which are equally concerned with both formats. Matplotlib can handle this for us.
Many of the examples in this recipe could also be done directly with pandas (hence indirectly with matplotlib), but the point here is to exercise matplotlib.
Once again, we are going to use VAERS data to plot some information about the DataFrame’s metadata and summarize...