Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Data Visualization Cookbook

You're reading from  Python Data Visualization Cookbook

Product type Book
Published in Nov 2013
Publisher Packt
ISBN-13 9781782163367
Pages 280 pages
Edition 1st Edition
Languages
Author (1):
Igor Milovanovic Igor Milovanovic
Profile icon Igor Milovanovic

Table of Contents (15) Chapters

Python Data Visualization Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Preparing Your Working Environment 2. Knowing Your Data 3. Drawing Your First Plots and Customizing Them 4. More Plots and Customizations 5. Making 3D Visualizations 6. Plotting Charts with Images and Maps 7. Using Right Plots to Understand Data 8. More on matplotlib Gems Index

Index

A

  • Advanced Linux Sound Architecture (ALSA) / Getting ready
  • animate() function / How it works...
  • animation
    • with OpenGL / Animating with OpenGL, Getting ready, How it works..., There's more...
  • Animation (object) class / Getting ready
  • animation, matplotlib / Animating in matplotlib, How to do it..., How it works..., There's more...
  • annotations
    • adding / Adding a legend and annotations, How to do it..., How it works...
  • array slicing / How it works...
  • ArtistAnimation (TimedAnimation) class / Getting ready
  • autocorrelation
    • about / Importance of autocorrelation
    • importance / Importance of autocorrelation
    • plotting / How to do it..., How it works...
  • Axes3D / Getting ready
  • AxesGrid / Creating 3D bars
  • axis() function / How to do it...
  • axis label
    • transparency, setting / Setting the transparency and size of axis labels, How it works...
    • size, setting / Setting the transparency and size of axis labels, How it works...
  • axis lengths
    • defining / Defining axis lengths and limits, How it works...
  • axis limits
    • defining / Defining axis lengths and limits, How it works...

B

  • backends / Getting ready
  • background color
    • defining / Background color
  • barb
    • about / Drawing barbs
    • drawing / Drawing barbs, Getting ready, How it works..., There's more...
  • barbs function / Getting ready
  • bar charts
    • creating / Making bar charts with error bars, How to do it..., How it works...
  • bard3d function / How it works...
  • bar plot / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
  • Basemap / Creating 3D bars
    • used, for plotting data on map / Plotting data on a map using Basemap, How to do it..., How it works...
  • Basemap toolkit
    • URL, for documentation / There's more...
  • box plot / There's more...
    • making / Making a box and a whisker plot, Getting ready, How to do it..., How it works...

C

  • CAPTCHA image
    • generating / Generating CAPTCHA images, Getting ready, How it works..., There's more...
    • about / Generating CAPTCHA images, Getting ready
  • cell() mehtod / How it works...
  • chart line
    • shadow, adding to / Adding a shadow to the chart line, Getting ready, How to do it..., How it works..., There's more...
  • color
    • defining / Color
  • ColorBrewer
    • URL / Getting ready
  • Colorbrewer2
    • URL / Getting ready
  • colored markers
    • used, for drawing scatter plots / Drawing scatter plots with colored markers, How to do it...
  • colormaps
    • using / Using colormaps, Getting ready, How to do it..., How it works..., There's more...
  • colormaps, categories
    • sequential / Getting ready
    • diverging / Getting ready
    • qualitative / Getting ready
    • cyclic / Getting ready
  • colormaps, ColorBrewer
    • category / Getting ready
  • colormaps function / How to do it...
  • contour() function / Getting ready
    • call signature / Getting ready
  • contour(X,Y,Z) call signature / Getting ready
  • contour(X,Y,Z,N) call signature / Getting ready
  • contour(X,Y,Z,V) call signature / Getting ready
  • contour(Z) call signature / Getting ready
  • contour(Z, **kwargs) call signature / Getting ready
  • contour(Z,N) call signature / Getting ready
  • contour(Z,V) call signature / Getting ready
  • contourf(..., V) call signature / Getting ready
  • contour plot
    • about / Creating contour plots
    • creating / Creating contour plots, Getting ready, How it works...
  • controlled random datasets
    • generating / Generating controlled random datasets, Getting ready, How to do it...
  • convolve function / How to do it...
  • Coordinate system
    • Data / Getting ready
    • Axes / Getting ready
    • Figure / Getting ready
    • Display / Getting ready
  • correlate() function / How it works...
  • cosine plot
    • drawing / Drawing a simple sine and cosine plot, How to do it...
  • create_thumbnails() function / How it works...
  • cross-correlation
    • plotting, between two variables / Plotting the cross-correlation between two variables, Getting ready, How to do it..., How it works...
  • CSV
    • about / Importing data from CSV
  • csv.reader() method / How it works...
  • CSV file
    • data, importing from / Importing data from CSV, How it works..., There's more...
    • data, exporting to / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...

D

  • 3D bars
    • creating / Creating 3D bars, Getting ready, How to do it..., There's more...
  • 3D histograms
    • creating / Creating 3D histograms, How to do it..., How it works...
  • 3D visualization / Introduction
    • 3D bars, creating / Creating 3D bars, Getting ready, How to do it..., There's more...
    • 3D histograms, creating / Creating 3D histograms, How to do it..., How it works...
  • data
    • importing, from CSV file / Importing data from CSV, How it works..., There's more...
    • importing, from Microsoft Excel file / Importing data from Microsoft Excel files, Getting ready, How it works..., There's more...
    • importing, from fixed-width data file / Importing data from fixed-width datafiles, How to do it..., How it works...
    • importing, from tab-delimited file / Importing data from tab-delimited files, How it works..., There's more...
    • importing, from JSON resource / Importing data from a JSON resource, How it works..., There's more...
    • exporting, to JSON file / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...
    • exporting, to CSV file / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...
    • exporting, to Microsoft Excel file / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...
    • importing, from database / Importing data from a database, How to do it..., How it works..., There's more...
    • cleaning up, from outliers / Cleaning up data from outliers, How to do it...
    • plotting on map, Basemap used / Plotting data on a map using Basemap, How to do it..., How it works...
    • plotting on map, Google Map API used / Plotting data on a map using Google Map API, How to do it..., How it works..., There's more...
  • database
    • data, importing from / Importing data from a database, How to do it..., How it works..., There's more...
  • data table
    • adding, to figure / Adding a data table to the figure, How to do it..., How it works...
  • data visualization, types
    • line graphs / Introduction
    • bar charts / Introduction
    • histograms / Introduction
    • pie charts / Introduction
  • deactivate command / How to do it...
  • dialect / Importing data from tab-delimited files
  • Distutis / How it works...
  • Django 1.1 / Installing virtualenv and virtualenvwrapper
  • drawMap() function / How it works...
  • dump() method / How it works...
  • DVI to PNG converter / Getting ready

E

  • Enthought Python Distribution (EPD) / Installing matplotlib on Mac OS X
  • equential colormap / Getting ready
  • error bars
    • drawing / Making bar charts with error bars, How to do it..., How it works...
    • about / Getting ready, Making errorbars
    • making / Making errorbars, How to do it..., How it works...

F

  • figtext function / Getting ready
  • figure
    • data table, adding / Adding a data table to the figure, How to do it..., How it works...
  • figure() function / How it works..., Getting ready
  • file
    • reading / Reading files in chunks, How it works...
  • file system tree
    • visualizing, polar bar used / Visualizing the filesystem tree using a polar bar, How to do it..., How it works...
  • fill() function / There's more...
  • filled areas
    • plotting / Plotting with filled areas, How it works...
  • fill _between() function / Getting ready
  • fill_between() function / How it works...
  • fixed-width data file
    • data, importing from / Importing data from fixed-width datafiles, How to do it..., How it works...
  • font properties
    • using / Making use of text and font properties, Getting ready, How to do it..., How it works...
    • family / Getting ready
    • size / Getting ready
    • fontsize / Getting ready
    • style / Getting ready
    • fontstyle / Getting ready
    • variant / Getting ready
    • weight / Getting ready
    • fontweight / Getting ready
    • stretch / Getting ready
    • fontstretch / Getting ready
    • fontproperties / Getting ready
  • format_data() function / How it works...
  • freetype / Getting ready
  • freetype 1.4+ / Getting ready
  • FuncAnimation (TimedAnimation) / Getting ready

G

  • Gantt chart
    • about / Making Gantt charts
    • making / Making Gantt charts, How to do it..., How it works...
  • get() method / How it works...
  • get_captcha method / How it works...
  • get_size function / How it works...
  • Ghost script / Getting ready
  • GitHub
    • URL / How to do it...
  • Glumpy / Getting ready
  • Glumpy Quickstart
    • used, for animating with OpenGL / Using Glumpy Quickstart
  • Google Data Visualization Library / Getting ready
  • Google Developer
    • URL / There's more...
  • Google Geochart / How to do it...
  • Google Map API
    • used, for plotting data on map / Plotting data on a map using Google Map API, How to do it..., How it works..., There's more...
  • Google Visualization API / Getting ready
  • grids
    • setting / Setting ticks, labels, and grids, Getting ready, How to do it...
    • about / Customizing grids, Getting ready
    • customizing / Customizing grids, Getting ready, How it works...
  • GTK Tools / Creating 3D bars

H

  • hist() function / How to do it...
  • histograms
    • about / Making histograms
    • making / Making histograms, How to do it..., How it works...
    • using / Using scatter plots and histograms, Getting ready, How to do it..., There's more...
  • hold property / How to do it...
  • Homebrew project / Getting ready
  • horizontalalignment property / Getting ready
  • HTTP Protocol and Response message
    • URL / How it works...

I

  • ImageChops module / Getting ready
  • image data
    • importing, into NumPy arrays / Importing image data into NumPy arrays, How to do it..., How it works..., There's more...
  • ImageDraw module / Getting ready
  • ImageFilter module / Getting ready
  • Image module
    • im = Image.open(filename) method / Getting ready
    • im.crop(box) method / Getting ready
    • im.filter(filter) method / Getting ready
    • im.histogram() method / Getting ready
    • im.resize(size, filter) method / Getting ready
    • im.rotate(angle, filter) method / Getting ready
    • im.split() method / Getting ready
    • im.transform(size, method, data, filter) method / Getting ready
  • image processing
    • example / There's more...
    • with PIL / Processing images with PIL, Getting ready, How it works..., There's more...
  • image processing, Python / Importing image data into NumPy arrays, How to do it..., How it works..., There's more...
  • images
    • plotting / Plotting with images, How to do it..., How it works...
    • displaying, with other plots / Displaying an image with other plots in the figure, How to do it..., How it works..., There's more...
  • imread function / Getting ready
  • init() function / How it works...
  • installation, matplotlib / Installing matplotlib, NumPy, and SciPy, Getting ready, How to do it..., How it works...
    • on Mac OS X / Installing matplotlib on Mac OS X, How to do it...
    • on Windows / Installing matplotlib on Windows, How to do it...
  • installation, NumPy / Installing matplotlib, NumPy, and SciPy, Getting ready, How to do it..., How it works...
  • installation, PIL
    • for image processing / Installing Python Imaging Library (PIL) for image processing, How it works...
  • installation, requests module / Installing a requests module
  • installation, SciPy / Getting ready, How to do it..., There's more...
  • installation, SQLite library / Getting ready
  • installation, virtualenv / Installing virtualenv and virtualenvwrapper, How to do it...
  • installation, virtualenvwrapper / Installing virtualenv and virtualenvwrapper, How to do it...
  • intsallation, Python / Getting ready, How to do it...
  • IPython / There's more..., There's more...
  • IPython Notebook / There's more...
  • isolines / Creating contour plots

J

  • JSON
    • about / Importing data from a JSON resource
  • json.loads() function / There's more...
  • JSON file
    • data, exporting to / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...
  • JSON resource
    • data, importing from / Importing data from a JSON resource, How it works..., There's more...

L

  • labels
    • setting / Setting ticks, labels, and grids, Getting ready, How to do it...
  • LaTeX
    • about / Rendering text with LaTeX
    • used, for rendering text / Rendering text with LaTeX, How to do it..., How it works..., There's more...
    • syntax / Rendering text with LaTeX
  • LaTex syntax / How to do it...
  • LaTeX system / Getting ready
  • legend
    • adding / Adding a legend and annotations, How to do it..., How it works...
  • legend() function / How to do it...
  • libpng / Getting ready
  • libpng 1.2 / Getting ready
  • line markers
    • list / How it works...
  • line plot / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
    • styles, defining / Defining plot line styles, properties, and format strings, How to do it..., How it works...
    • properties, defining / Defining plot line styles, properties, and format strings, How to do it..., How it works...
    • format strings, defining / Defining plot line styles, properties, and format strings, How to do it..., How it works...
    • properties / How it works...
  • linestyles
    • list / How it works...
  • linspace function / How to do it...
  • loadtxt() function / There's more...
  • load_data function / How it works...
  • load_files() function / How it works...
  • logarithmic plot
    • about / Understanding logarithmic plots, How to do it..., How it works...
    • rules / Getting ready

M

  • map
    • data plotting, Basemap used / Plotting data on a map using Basemap, How to do it..., How it works...
    • data plotting, Google Map API used / Plotting data on a map using Google Map API, How to do it..., How it works..., There's more...
  • matplotlib
    • installing / Installing matplotlib, NumPy, and SciPy, Getting ready, How to do it..., How it works...
    • installing, on Mac OS X / Installing matplotlib on Mac OS X, How to do it...
    • installing, on Windows / Installing matplotlib on Windows, How to do it...
    • about / Introduction
    • plot, elements / How to do it...
    • animation / Animating in matplotlib, How to do it..., How it works..., There's more...
  • matplotlib.pylab interface / Getting ready
  • matplotlib API / Getting ready
  • matplotlib parameters
    • customizing, in code / Customizing matplotlib's parameters in code, How it works...
    • customizing, per project / Customizing matplotlib's parameters per project, How to do it..., How it works...
  • matplotlibrc configuration file
    • location / How it works...
    • settings / How it works...
  • matplotlib software
    • matplotlib.pylab interface / Getting ready
    • matplotlib API / Getting ready
    • backends / Getting ready
  • Mayavi / Getting ready
  • Median absolute deviation (MAD) / Getting ready
  • Median Filter / There's more...
  • meshgrid() function / How it works...
  • meshgrid property / How it works...
  • Microsoft Excel file
    • data, importing from / Importing data from Microsoft Excel files, Getting ready, How it works..., There's more...
    • data, exporting to / Exporting data to JSON, CSV, and Excel, How to do it..., How it works...
  • mkvirtualenv ENV command / How to do it...
  • mplot3d / Creating 3D bars
  • multialignment property / Getting ready

N

  • Natgrid / Creating 3D bars
  • NetCDF / There's more...
  • next() function / Reading files in chunks
  • noise signal
    • smoothing, in real-world data / Smoothing the noise in real-world data, How it works..., There's more...
  • NumPy
    • installing / Installing matplotlib, NumPy, and SciPy, Getting ready, How to do it..., How it works...
    • about / Getting ready
    • URL / Getting ready
  • NumPy arrays
    • image data, importing into / Importing image data into NumPy arrays, How to do it..., How it works..., There's more...

O

  • OO API
    • differentiating, with pyplot / Understanding the difference between pyplot and OO API, Getting ready, How to do it..., How it works...
    • about / Understanding the difference between pyplot and OO API
  • open() function / There's more...
  • OpenGL / Getting ready
    • animating with / Animating with OpenGL, Getting ready, How it works..., There's more...
    • animating with, Pyglet Quickstart used / Using Pyglet Quickstart
    • animating with, Glumpy Quickstart used / Using Glumpy Quickstart
  • OpenRefine
    • URL / There's more...
  • Optical Character Recognition (OCR) / There's more...
  • outliers
    • data, cleaning up / Cleaning up data from outliers, How to do it...

P

  • pie charts
    • about / Making pie charts count
    • making / Making pie charts count, How to do it...
  • PIL
    • about / Installing Python Imaging Library (PIL) for image processing, How to do it...
    • installing, for image processing / Installing Python Imaging Library (PIL) for image processing, How to do it...
    • URL / There's more...
    • used, for image processing / Processing images with PIL, Getting ready, How it works..., There's more...
  • Pillow
    • URL / There's more...
  • plot
    • elements / How to do it...
    • color, defining / Color
    • background color, defining / Background color
  • plot() function / How to do it..., There's more..., How it works...
  • plot types
    • defining / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
    • bar / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
    • line / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
    • stacked charts / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
    • box plot / There's more...
    • whiskers plot / There's more...
    • cosine plot / Drawing a simple sine and cosine plot, How to do it...
    • sine plot / Drawing a simple sine and cosine plot, How to do it...
    • scatter plots / Drawing scatter plots with colored markers
    • contour plot / Creating contour plots
    • polar plot / Drawing polar plots
    • logarithmic plot / Understanding logarithmic plots
    • stem plot / Creating a stem plot
    • stream plot / Drawing streamlines of vector flow
  • polar() function / Getting ready
  • polar plot
    • drawing / Drawing polar plots, How to do it..., How it works...
    • about / Drawing polar plots
  • probability distribution / Getting ready
  • Processing
    • URL / Pyprocessing introduction
  • proTeX system / Getting ready
  • Pyglet / Getting ready
  • Pyglet Quickstart
    • used, for animating with OpenGL / Using Pyglet Quickstart
  • PyPi
    • URL / There's more...
  • pyplot
    • differentiating, with OO API / Understanding the difference between pyplot and OO API, Getting ready, How to do it..., How it works...
  • pyplot function / How to do it...
  • Pyprocessing
    • about / Pyprocessing introduction
  • Python
    • intsalling / Getting ready, How to do it...
    • CSV module / Importing data from CSV
    • file, reading / Reading files in chunks, How it works...
    • image processing / Importing image data into NumPy arrays, How to do it..., How it works..., There's more...
  • Python 2.3 / Installing virtualenv and virtualenvwrapper
  • Python 2.6 / Installing virtualenv and virtualenvwrapper
  • Python 2.7+ Version / Getting ready
  • Python 3.3+ Version / Getting ready
  • Python Distribution Utilities / How it works...

R

  • .rc file / Customizing matplotlib's parameters in code
  • random module / How to do it...
  • read() function / Reading files in chunks
  • read_png() function / How it works...
  • real-world data
    • noise signal, smoothing / Smoothing the noise in real-world data, How it works..., There's more...
  • reCAPTCHA
    • URL / There's more...
  • recaptcha-client
    • URL / There's more...
  • requests module
    • installing / Installing a requests module
    / Getting ready
  • Response.json() method / How it works...
  • run() function / Pyprocessing introduction

S

  • save() function / How it works..., There's more...
  • scatter() function / How it works..., There's more...
  • scatterhist() function / There's more...
  • scatter plots
    • drawing, with colored markers / Drawing scatter plots with colored markers, How to do it...
    • about / Drawing scatter plots with colored markers
    • using / Using scatter plots and histograms, Getting ready, How to do it..., There's more...
  • scikit-image
    • URL / There's more...
  • SciPy
    • installing / Getting ready, How to do it..., There's more...
    / Getting ready
  • SciPy Cookbook
    • URL / How it works...
  • SciPy signal toolbox
    • implementation / There's more...
  • seek() function / Reading files in chunks
  • setp() function / How to do it...
  • setstate() function / How to do it...
  • shadow
    • adding, to chart line / Adding a shadow to the chart line, Getting ready, How to do it..., How it works..., There's more...
  • sheets() mehtod / How it works...
  • show() function / How it works..., How it works...
  • sine plot
    • drawing / Drawing a simple sine and cosine plot, How to do it...
  • spectrogram
    • about / Understanding spectrograms, Getting ready, How to do it..., There's more...
  • spines
    • moving, to center / Moving spines to the center, How to do it...
    • about / Moving spines to the center
  • split() function / There's more...
  • SQLite db file / How to do it...
  • SQLite library
    • installing / Getting ready
  • stacked chart plot / Defining plot types – bar, line, and stacked charts, How to do it..., How it works..., There's more...
  • standard deviation / Getting ready
  • statistical population / Getting ready
  • stem() function / How to do it...
  • stem plot
    • about / Creating a stem plot
    • creating / Creating a stem plot, How to do it..., How it works...
    • formatters / How to do it...
  • streaming data source
    • reading / Reading streaming data sources, How it works...
  • stream plot
    • drawing / Drawing streamlines of vector flow, How to do it..., How it works..., There's more...
    • about / Drawing streamlines of vector flow
    • used, for visualizing vector field / Drawing streamlines of vector flow
  • struct module
    • URL / Importing data from fixed-width datafiles
    • about / Getting ready
  • subplot
    • using / Using subplots, Getting ready, How it works...
  • suptitle function / Getting ready

T

  • tab-delimited file
    • data, importing from / Importing data from tab-delimited files, How it works..., There's more...
  • Table Visualization / How to do it...
  • tell() function / Reading files in chunks
  • test_* function / There's more...
  • text
    • alignment properties / Getting ready
    • rendering, with LaTeX / Rendering text with LaTeX, How to do it..., How it works..., There's more...
  • text function / Getting ready
  • text properties
    • using / Making use of text and font properties, Getting ready, How to do it..., How it works...
  • ticks
    • setting / Setting ticks, labels, and grids, Getting ready, How to do it...
    • about / How to do it...
  • TimedAnimation (Animation) class / Getting ready
  • title function / Getting ready
  • toolkit / Creating 3D bars
  • transformations / Getting ready

U

  • Ubuntu 13.04 / How it works...
  • under-plot area
    • filling / Filling an under-plot area, How to do it...
  • urllib2 module / Installing a requests module
  • usevlines() function / Getting ready

V

  • variance / Getting ready
  • verticalalignment property / Getting ready
  • virtualenv
    • about / Installing virtualenv and virtualenvwrapper
    • installing / Installing virtualenv and virtualenvwrapper, How to do it...
  • virtualenvwrapper
    • installing / Installing virtualenv and virtualenvwrapper, How to do it...
    • about / Getting ready
    • URL / Getting ready

W

  • whiskers plot / There's more...
    • making / Making a box and a whisker plot, Getting ready, How to do it..., How it works...
  • WIMP
    • URL / Processing images with PIL
  • windowing algorithm / How it works...
  • workon ENV command / How to do it...
  • write_data() function / There's more...
  • WYSIWYG
    • URL / Processing images with PIL

X

  • xlabel function / Getting ready

Y

  • ylabel function / Getting ready
lock icon The rest of the chapter is locked
arrow left Previous Chapter
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}