Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python Data Visualization

You're reading from   Mastering Python Data Visualization Generate effective results in a variety of visually appealing charts using the plotting packages in Python

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783988327
Length 372 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. A Conceptual Framework for Data Visualization 2. Data Analysis and Visualization FREE CHAPTER 3. Getting Started with the Python IDE 4. Numerical Computing and Interactive Plotting 5. Financial and Statistical Models 6. Statistical and Machine Learning 7. Bioinformatics, Genetics, and Network Models 8. Advanced Visualization A. Go Forth and Explore Visualization Index

The planar graph test

Planar graphs are graphs that can be drawn on a plane without any intersecting edges. In order to draw them, you have to start from a vertex, draw from edge to edge, and keep track of the faces as the drawing continues. According to Kuratowski, a graph is planar if it does not contain a subgraph that is part of the complete graph on five vertices.

The following is a simple example of a planar graph:

The planar graph test

Euler's formula connects a number of vertices, edges, and faces. According to Euler's formula, if a finite and connected planar graph is drawn in the plane without any intersecting edge, and if v represents the number of vertices, e represents the number of edges, and f represents the number of faces, then v − e + f = 2.

Besides Mayavi, NetworkX, and planarity, you can use the gamera package to create and display graphs. However, gamera is only available on Windows. We have a simple example here that uses planarity and NetworkX:

import planarity 
import networkx...
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 $19.99/month. Cancel anytime
Banner background image