Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
matplotlib Plotting Cookbook
matplotlib Plotting Cookbook

matplotlib Plotting Cookbook: Discover how easy it can be to create great scientific visualizations with Python. This cookbook includes over sixty matplotlib recipes together with clarifying explanations to ensure you can produce plots of high quality.

eBook
£25.99 £28.99
Paperback
£37.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

matplotlib Plotting Cookbook

Chapter 2. Customizing the Color and Styles

In this chapter, we will cover:

  • Defining your own colors

  • Using custom colors for scatter plots

  • Using custom colors for bar charts

  • Using custom colors for pie charts

  • Using custom colors for boxplots

  • Using colormaps for scatter plots

  • Using colormaps for bar charts

  • Controlling a line pattern and thickness

  • Controlling a fill pattern

  • Controlling a marker's style

  • Controlling a marker's size

  • Creating your own markers

  • Getting more control over markers

  • Creating your own color scheme

Introduction


All the plots available with matplotlib come with their default styles. While this is convenient for prototyping, our finalized graph will require some departure from the default styles. You might need to use gray levels only, or follow an existing color scheme, or more generally, an existing visual chart. matplotlib has been designed with flexibility in mind. It is easy to adapt the style of a matplotlib figure, as the recipes of this chapter will illustrate.

Defining your own colors


The default colors used by matplotlib are rather bland. We might have our own preferences of what convenient colors are. We might want to have figures that follow a predefined color scheme so that they fit well within a document or a web page. More pragmatically, we might simply have to make figures for a document that will be printed on a black-and-white printer. In this recipe, we are going to see how to define our own colors.

Getting ready

There are multiple ways to define colors in matplotlib. Some of them are as follows:

  • Triplets: These colors can be described as a real value triplet—the red, blue, and green components of a color. The components have to be in the [0, 1] interval. Thus, the Python syntax (1.0, 0.0, 0.0) will code a pure, bright red, while (1.0, 0.0, 1.0) appears as a strong pink.

  • Quadruplets: These work as triplets, and the fourth component defines a transparency value. This value should also be in the [0, 1] interval. When rendering a figure to...

Using custom colors for scatter plots


We can control the colors used for a scatter plot just as we do for a curve plot. In this recipe, we are going to see how to use the two ways to control the colors of a scatter plot.

Getting ready

The scatter plot function pyplot.scatter() offers the following two options to control the colors of dots through its color parameter, or its shortcut c:

  • Common color for all the dots: If the color parameter is a valid matplotlib color definition, then all the dots will appear in that color.

  • Individual color for each dot: If the color parameter is a sequence of a valid matplotlib color definition, the ith dot will appear in the ith color. Of course, we have to give the required colors for each dot.

How to do it...

In the following script, we display two sets of points, A and B, drawn from two bivariate Gaussian distributions. Each set has its own color. We call pyplot.scatter() twice, once for each point set, as shown in the following script:

import numpy as np
import...

Using custom colors for bar charts


Bar charts are used a lot in web pages and presentations where one often has to follow an established color scheme. Thus, a good control on their colors is a must. In this recipe, we are going to see how to color a bar chart with our own colors.

How to do it...

In Chapter 1, First Steps, we have already seen how to make bar charts. Controlling which colors are used works the same as it does for curves plots and scatter plots, that is, through an optional parameter. In this example, we load the age pyramid of a country's population from a file as follows:

import numpy as np
import matplotlib.pyplot as plt

women_pop = np.array([5., 30., 45., 22.])
men_pop     = np.array([5., 25., 50., 20.])

X = np.arange(4)
plt.barh(X, women_pop, color = '.25')
plt.barh(X, -men_pop, color = '.75')

plt.show()

The preceding script shows one bar chart with the age repartition for men and another bar chart for women. Women appear in dark gray, while men appear in light gray, as...

Using custom colors for pie charts


Like bar charts, pie charts are also used in contexts where the color scheme might matter a lot. Pie chart coloring works mostly like in bar charts. In this recipe, we are going to see how to color pie charts with our own colors.

How to do it...

The function pyplot.pie() accepts a list of colors as an optional parameter, as shown in the following script:

import numpy as np
import matplotlib.pyplot as plt

values = np.random.rand(8)
color_set = ('.00', '.25', '.50', '.75')

plt.pie(values, colors = color_set)
plt.show()

The preceding script will produce the following pie chart:

How it works...

Pie charts accept a list of colors using the colors parameter (beware, it is colors, not color). However, the color list does not have as many elements as the input list of values. If there are less colors than values, then pyplot.pie() will simply cycle through the color list. In the preceding example, we gave a list of four colors to color a pie chart that consisted of...

Using custom colors for boxplots


Boxplots are common staple features of scientific publications. Colored boxplots are no trouble; however, you may need to use black and white only. In this recipe, we are going to see how to use custom colors with boxplots.

How to do it...

Every function that creates a specific figure returns some values—they are the low-level drawing primitives that constitute the figure. Most of the time, we don't bother to get those return values. However, manipulating those low-level drawing primitives allows some fine-tuning, such as custom color schemes for a box plot.

Making a boxplot appear totally black is a little bit trickier than it should be, as shown in the following script:

import numpy as np
import matplotlib.pyplot as plt
values = np.random.randn(100)

b = plt.boxplot(values)
for name, line_list in b.iteritems():
  for line in line_list:
    line.set_color('k')

plt.show()

The preceding script produces the following graph:

How it works...

Plotting functions returns...

Using colormaps for scatter plots


When using a lot of colors, defining each color one by one is tedious. Moreover, building a good set of colors is a problem in itself. In some cases, colormaps can address those issues. Colormaps define colors with a continuous function of one variable to one value, corresponding to one color. matplotlib provides several common colormaps; most of them are continuous color ramps. In this recipe, we are going to see how to color scatter plots with a colormap.

How to do it...

Colormaps are defined in the matplotib.cm module. This module provides functions to create and use colormaps. It also provides an exhaustive choice of predefined color maps.

The function pyplot.scatter() accepts a list of values for the color parameter. When providing a colormap (with the cmap parameter), those values will be interpreted as a colormap index as follows:

import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt

N = 256
angle  = np.linspace(0, 8 * 2 * np...

Using colormaps for bar charts


The pyplot.scatter() function has a built-in support for colormaps; some other plotting functions that we will discover later also have such support. However, some functions, such as pyplot.bar(), do not take colormaps as inputs to plot bar charts. In this recipe, we are going to see how to color a bar chart with a colormap.

matplotlib has helper functions to explicitly generate colors from a colormap. For instance, we can color the bars of a bar chart with the functions of the values they represent.

How to do it...

We will use the matplotlib.cm module in this recipe just as we did in the previous recipe. This time, we will directly use a colormap object rather than letting a rendering function use it automatically. We will also need the matplotlib.colors module, which contains the utility functions related to colors as shown in the following script:

import numpy as np
import matplotlib.cm as cm
import matplotlib.colors as col
import matplotlib.pyplot as plt

values...

Controlling a line pattern and thickness


When creating figures for black and white documents, we are limited to gray levels. In practice, three levels of gray are usually the most we can reasonably use. However, using different line patterns allows some diversity. In this recipe, we are going to see how to control line pattern and thickness.

How to do it...

As in the case of colors, the line style is controlled by an optional parameter of pyplot.plot()as shown in the following script:

import numpy as np
import matplotlib.pyplot as plt

def pdf(X, mu, sigma):
  a = 1. / (sigma * np.sqrt(2. * np.pi))
  b = -1. / (2. * sigma ** 2)
  return a * np.exp(b * (X - mu) ** 2)

X = np.linspace(-6, 6, 1024)

plt.plot(X, pdf(X, 0., 1.),   color = 'k', linestyle = 'solid')
plt.plot(X, pdf(X, 0.,  .5),  color = 'k', linestyle = 'dashed')
plt.plot(X, pdf(X, 0.,  .25), color = 'k', linestyle = 'dashdot')

plt.show()

The preceding script will produce the following graph:

How it works...

In this example, we use...

Controlling a fill pattern


matplotlib offers fairly limited support to fill surfaces with a pattern. For line patterns, it can be helpful when preparing figures for black-and-white prints. In this recipe, we are going to look at how we can fill surfaces with a pattern.

How to do it...

Let's demonstrate the use of fill patterns with a bar chart as follows:

import numpy as np
import matplotlib.pyplot as plt

N = 8
A = np.random.random(N)
B = np.random.random(N)
X = np.arange(N)

plt.bar(X, A, color = 'w', hatch = 'x')
plt.bar(X, A + B, bottom = A, color = 'w', hatch = '/')

plt.show()

The preceding script produces the following graph:

How it works...

Rendering function filling volumes, such as pyplot.bar(), accept an optional parameter, hatch. This parameter can take the following values:

  • /

  • \

  • |

  • -

  • +

  • x

  • o

  • O

  • .

  • *

Each value corresponds to a different hatching pattern. The color parameter will control the background color of the pattern, while the edgecolor parameter will control the color of the hatching.

Controlling a marker's style


In Chapter 1, First Steps, we have seen how we can display the points of a curve as dots. Also, scatter plots represent each point of a dataset. As it turns out, matplotlib offers a variety of shapes to replace dots with other kinds of markers. In this recipe, we are going to see how to set a marker's style.

Getting ready

Markers can be specified in various ways as follows:

  • Predefined markers: They can be predefined shapes, represented as a number in the [0, 8] range, or some strings

  • Vertices list: This is a list of value pairs, used as coordinates for the path of a shape

  • Regular polygon: It represents a triplet (N, 0, angle) for an N sided regular polygon, with a rotation of angle degrees

  • Start polygon: It represents a triplet (N, 1, angle) for an N sided regular star, with a rotation of angle degrees

How to do it...

Let's take a script that shows two sets of points with two different colors. Now we will display all the points in black, but with different markers as...

Controlling a marker's size


As seen in the previous recipe, we can control the style of markers; controlling their size also works along the same lines. In this recipe, we are going to see how to control marker sizes.

How to do it...

A marker's size is controlled in the same way as other marker attributes, with a dedicated optional parameter as shown in the following script:

import numpy as np
import matplotlib.pyplot as plt
A = np.random.standard_normal((100, 2))
A += np.array((-1, -1))
B = np.random.standard_normal((100, 2))
B += np.array((1, 1))

plt.scatter(B[:,0], B[:,1], c = 'k', s = 100.)
plt.scatter(A[:,0], A[:,1], c = 'w', s = 25.)

plt.show()

The preceding script produces the following graph:

In this example, we display two sets of points of different sizes. The marker's size is set by the parameter s for pyplot.scatter(). Oddly enough, it sets the surface area of a marker and not its radius.

Because the sizes are the actual surface areas and not the radii, they follow a quadratic progression...

Creating your own markers


matplotlib offers a large variety of marker shapes. But you might not find something that suits your specific need. For instance, you might wish to use an animal silhouette, a company's logo, and so on. In this recipe, we are going to see how to define our own marker shapes.

How to do it...

matplotlib describes shapes as a path—a sequence of points linked together. Thus, to define our own marker shapes, we have to provide a sequence of points. In the following script example, we will define a cross-like shape:

import numpy as np
import matplotlib.path as mpath
from matplotlib import pyplot as plt

shape_description = [
  ( 1.,  2., mpath.Path.MOVETO),
  ( 1.,  1., mpath.Path.LINETO),
  ( 2.,  1., mpath.Path.LINETO),
  ( 2., -1., mpath.Path.LINETO),
  ( 1., -1., mpath.Path.LINETO),
  ( 1., -2., mpath.Path.LINETO),
  (-1., -2., mpath.Path.LINETO),
  (-1., -1., mpath.Path.LINETO),
  (-2., -1., mpath.Path.LINETO),
  (-2.,  1., mpath.Path.LINETO),
  (-1.,  1., mpath.Path...

Getting more control over markers


Fine controls, such as edge color, interior color, and so on, are possible on markers. It is, for instance, possible to draw a curve with markers of a different color than the color of the curve. In this recipe, we will look at how to have a fine control on a marker's aspect.

How to do it...

We have learned about the optional parameters to set the shape, color, and size of markers. There are plenty of others to play with, as demonstrated in the following script:

import numpy as np
import matplotlib.pyplot as plt

X = np.linspace(-6, 6, 1024)
Y = np.sinc(X)

plt.plot(X, Y,
  linewidth = 3.,
  color = 'k',
  markersize = 9,
  markeredgewidth = 1.5,
  markerfacecolor = '.75',
  markeredgecolor = 'k',
  marker = 'o',
  markevery = 32)
plt.show()

The call to pyplot.plot() is broken over several lines for the readability purpose—one line per optional parameter. The preceding script will produce the following graph:

How it works...

This example demonstrates the use of...

Creating your own color scheme


The default colors used by matplotlib are meant to be reasonably publication-ready for printed documents. Thus, the background is white by default, while the labels, axes, and other annotations appear in black. In a different usage context, you might prefer a different color scheme; for instance, having the figure's background turned to black with the annotation in white. In this recipe, we will show how to change matplotlib's default settings.

How to do it...

In matplotlib, various objects, such as axes, figures, and labels can be addressed individually. Changing the color settings of all those objects, one by one, would be very cumbersome. Fortunately, all matplotlib objects choose their default colors from a centralized configuration object.

In the following script, we use matplotlib's centralized configuration to have a black background and white annotations:

import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt


mpl.rc('lines',...
Left arrow icon Right arrow icon

What you will learn

  • Discover how to create all the common plots you need
  • Enrich your plots with annotations and sophisticated legends
  • Take control of your plots and master colors, linestyle, and scales
  • Add a dimension to your plots and go 3D
  • Integrate your graphics into your applications
  • Automate your work and generate a large batch of graphics
  • Create interactive plots with matplotlib
  • Combine your plots to create sophisticated visualizations

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 26, 2014
Length: 222 pages
Edition :
Language : English
ISBN-13 : 9781849513272
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 26, 2014
Length: 222 pages
Edition :
Language : English
ISBN-13 : 9781849513272
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 108.97
Mastering Matplotlib
£32.99
Mastering Object-oriented Python
£37.99
matplotlib Plotting Cookbook
£37.99
Total £ 108.97 Stars icon

Table of Contents

8 Chapters
First Steps Chevron down icon Chevron up icon
Customizing the Color and Styles Chevron down icon Chevron up icon
Working with Annotations Chevron down icon Chevron up icon
Working with Figures Chevron down icon Chevron up icon
Working with a File Output Chevron down icon Chevron up icon
Working with Maps Chevron down icon Chevron up icon
Working with 3D Figures Chevron down icon Chevron up icon
User Interface Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(10 Ratings)
5 star 30%
4 star 30%
3 star 20%
2 star 20%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Joel Sevilla Mar 24, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I agree with other more experienced reviewers. It is terrific for beginners (like me). Text is clear and the code always run, so the beginner does not have to debug authors code (a task just for advanced users). This book shines between my good list of Python books. Thanks professor Devert.
Amazon Verified review Amazon
Hudan Studiawan Aug 04, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
We are often get confused with text book that provides very complex materials and hard to understand. There are rarely a book that can give us a easy and step-by-step guide to get our job done. Fortunately, Packt Publishing comes with a good news!One of the book provided by Packt is matplotlib Plotting Cookbook. It’s all about plotting your graph with matplotlib. It is an open source library massively used and supported by community worldwide. In this book, you can find any kind of plotting type. Starting from live curve, points, bar chart, pie chart, histograms, and other types of graph. A how-to draw simple graph is given in Chapter 1.This kind of matplotlib library is based on Python programming language. Don’t worry about the difficulty when starting graph for the first time. Python is an intuitive computer programming languange and it is easy to learn.In the next chapter, the author, Alexandre Devert, depicts customization for color and pattern of our chart. We can also control marker style and size, or even creating our own color maps for plotted graph. Like other book published by Packt, all steps are briefly described and very well understood :)In Chapter 3, we will find many instructions to modify annotations for our graph. Formula annotation can be employed using Latex-style notations. The book also describes guides to add label to axis, text, legend, and grid behind the chart. Every part is clearly illustrated by “How to do it” subsection and supported with “How it works … ” part in each section. Chapter 4 will drive us to customization of the figure.We can save our generated graph from matplotlib to file. The supported file format are png, svg, or pdf file. We can follow these guides in Chapter 5. This book is also completed with a story about working with 2D and 3D figures Chapter 6 and 7, respectively. The last chapter, we can integrate our work with Python user interface library. matplotlib have an friendly interface to Tkinter, wxWidgets, GTK, and Pyglet.
Amazon Verified review Amazon
Ty Sid Jun 02, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book has a useful collection of examples for many common use cases that a developer would need in working with Matplotlib. It is written in an easy to follow style that makes it suitable for Python developers that are starting out with Matplotlib. It is not a Python tutorial in any way, but a minimal knowledge of Python is sufficient to understand the code and the examples. I'm relatively new to Python but have significant programming experience in other languages and had no difficulty in picking up the various tools that are presented in the book. Each example comes with complete code listings that just work without any modifications, so one can easily see what is happening with that code. The eBook version comes with code files for all the examples in the book that can be downloaded directly from the Publisher's website (Packt Publishing).I had a bare minimum exposure to Matplotlib but I did not feel that I need to separately following any other tutorial to learn any particular tools. IMO, the given examples provide a better understanding of the most useful tools by seeing them in action and trying them out on your own.The last chapter on User Interfaces covers creating interactive plots using Tkinter, wxWidgets, GTK, etc, which is helpful in bringing the plots to an audience in a way that makes it easier to explain and clarify the data being considered.I would recommend the Matplotlib Plotting Cookbook to people starting out with Matplotlib who want to get up to speed quickly. It's also useful as a quick reference for experienced developers since many common use cases are covered. The index and the table of contents make it simple to find any particular use case.
Amazon Verified review Amazon
Joe Kington Jun 23, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book is intended to introduce matplotlib to people with relatively little experience with python, and does a good job of getting someone with little experience "up and running" very quickly. The first chapter does a particularly good job of giving a crash course in the basics of scientific programming with python in just a few pages.Overall, this book is easy to follow and does a good job showing concrete examples of most of matplotlib's functionality. Many of the "There's more" and "How it works" sections do a great job of explaining things in a bit more detail (though I do wish they were longer). There's a nice linear flow to the way the chapters are laid out, and for something called a "cookbook", it's more of an "introduction through example" (which is a good thing!).However, I'm not sure this book adds much over the official documentation. There are a lot of examples, but not enough explanation of the underlying concepts (then again, it is a "cookbook" and not "the exhaustive guide to matplotlib", so perhaps I'm being a bit unfair). While matplotlib is a bit disorganzied in some regards, there are several things that are common throughout the library that are useful to know. For example, it would be nice if this book more prominently mentioned that the plotting commands all return "artists" whose properties can be adjusted through the "artist.set(...)" function.A couple of minor pet peeves:1) The author sticks almost entirely to the pyplot interface throughout the book, but then suddenly changes over to the standard object-oriented interface part-way through (beginning with the 3D plotting chapter). It would be good to explain the change. Better yet, explain what the difference is and the relative advantages of the two.2) The chapters are rather misleadingly named. For example, Chapter 6 is titled "Working with Maps", but doesn't cover matplotlib's mapping capabilities (e.g. basemap or cartopy - both dealing with geographic maps) at all. Instead, it deals with image data and vector plots (e.g. "imshow", "quiver", etc). Similarly Chapter 3 - "Working with Annotations" is a great chapter, but the title is a bit misleading: it deals with adding low-level artists like patches and lines as well as adding latex-formatted equations, title, labels, etc. (Again, I'm being a bit picky, but being able to accurately scan the table of contents is very important in technical books.)
Amazon Verified review Amazon
Mgx May 08, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
First of all, the book is very easy to read. Most of the book is filled with recipes code examples and their illustrated outputs. So, it would be fairly simple to complete this book in a day or two.Secondly, I agree with the other review that this book would be quite useful to beginners who are just starting out with Python + Matplotlib. In addition, there are a few recipes inside that could save time for intermediate and expert users. For example, I found some of the recipes for 3D plotting useful, but your mileage could vary depending on your data. The last few recipes show how to interface Matplotlib with Python GUI interfaces and this could also be helpful.However, I feel that the price of the book is high ($40+) considering the material it offers. After all, Matplotlib is technically free to use and has free, well-presented documentation online. This book does not substitute the online documentation at all - rather, it presents a subset of the most useful instructions to get things shaking fast.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon