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

Chapter 5. Visualizing Multivariate Data

When we have big data that contains many variables, the plot types in Chapter 4, Visualizing Online Data may no longer be an effective way of data visualization. We may try to cramp as many variables in a single plot as possible, but the overcrowded or cluttered details would quickly reach the boundary of a human's visual perception capabilities.

In this chapter, we aim to introduce multivariate data visualization techniques; they enable us to better understand the distribution of data and the relationships between variables. Here is the outline of this chapter:

  • Getting End-of-Day (EOD) stock data from Quandl
  • Two-dimensional faceted plots:
    • Factor plot in Seaborn
    • Faceted grid in Seaborn
    • Pair plot in Seaborn
  • Other two-dimensional multivariate plots:
    • Heatmap in Seaborn
    • Candlestick plot in
      • Visualizing various stock market indicators
    • Building a comprehensive stock chart
  • Three-dimensional plots:
    • Scatter plot
    • Bar chart
    • Caveats of using Matplotlib...