Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Data Visualization Cookbook (Second Edition)

You're reading from  Python Data Visualization Cookbook (Second Edition)

Product type Book
Published in Nov 2015
Publisher
ISBN-13 9781784396695
Pages 302 pages
Edition 1st Edition
Languages

Table of Contents (16) Chapters

Python Data Visualization Cookbook Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Preparing Your Working Environment Knowing Your Data Drawing Your First Plots and Customizing Them More Plots and Customizations Making 3D Visualizations Plotting Charts with Images and Maps Using the Right Plots to Understand Data More on matplotlib Gems Visualizations on the Clouds with Plot.ly Index

Defining plot types – bar, line, and stacked charts


In this recipe, we will present different basic plots and what are they used for. Most of the plots described here are used daily, and some of them present the basis for understanding more advanced concepts in data visualization.

Getting ready

We start with some common charts from the matplotlib.pyplot library with just sample datasets; we start with basic charting and lay down the foundations of the following recipes.

How to do it...

We start by creating a simple plot in IPython. IPython is great because it allows us to interactively change plots and see the results immediately. You need to follow these steps for that:

  1. Start IPython by typing the following code at the command prompt:

    $ ipython
    
  2. Import the necessary functions:

    In [1]: from matplotlib.pyplot import *
    
  3. Then type the matplotlib plot code:

    In [2]: plot([1,2,3,2,3,2,2,1])
    Out[2]: [<matplotlib.lines.Line2D at 0x412fb50>]

The plot should open in a new window displaying the default...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}