Book Image

Matplotlib 2.x By Example

By : Allen Yu, Claire Chung, Aldrin Yim
Book Image

Matplotlib 2.x By Example

By: Allen Yu, Claire Chung, Aldrin Yim

Overview of this book

Big data analytics are driving innovations in scientific research, digital marketing, policy-making and much more. Matplotlib offers simple but powerful plotting interface, versatile plot types and robust customization. Matplotlib 2.x By Example illustrates the methods and applications of various plot types through real world examples. It begins by giving readers the basic know-how on how to create and customize plots by Matplotlib. It further covers how to plot different types of economic data in the form of 2D and 3D graphs, which give insights from a deluge of data from public repositories, such as Quandl Finance. You will learn to visualize geographical data on maps and implement interactive charts. By the end of this book, you will become well versed with Matplotlib in your day-to-day work to perform advanced data visualization. This book will guide you to prepare high quality figures for manuscripts and presentations. You will learn to create intuitive info-graphics and reshaping your message crisply understandable.
Table of Contents (15 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback

Visualizing statistical data more intuitively

Science is based on statistics. We propose hypotheses from observations. We test and reject the null hypothesis when its probability, the value, is lower than a threshold, so that observed phenomena are not likely arisen from mere chance; that is, our proposed hypothesis is supported.

There are some specific plot types that can ease the visualization of descriptive and inferential statistics. We will first revisit more variants of bar charts–stacked bar chart and layered histograms, which are commonly used in scientific publications to summarize and describe data.

Stacked bar chart and layered histogram

In Chapter 4, Visualizing Online Data, we showed the procedures to create bar charts using Matplotlib and Seaborn. It is little known that the pandas package can be used for visualization, as most people only concentrate on its data analysis capabilities. Since the pandas visualization module was built on top of Matplotlib, we can exploit the powerful...