Matplotlib for Python Developers Effective techniques for data visualization with Python 2nd Edition Yim 2024 Scribd Download
Matplotlib for Python Developers Effective techniques for data visualization with Python 2nd Edition Yim 2024 Scribd Download
com
https://textbookfull.com/product/matplotlib-for-python-
developers-effective-techniques-for-data-visualization-with-
python-2nd-edition-yim/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/python-data-analytics-with-pandas-
numpy-and-matplotlib-2nd-edition-fabio-nelli/
textboxfull.com
https://textbookfull.com/product/python-data-analytics-with-pandas-
numpy-and-matplotlib-nelli/
textboxfull.com
https://textbookfull.com/product/practical-python-data-visualization-
a-fast-track-approach-to-learning-data-visualization-with-python-
ashwin-pajankar/
textboxfull.com
https://textbookfull.com/product/python-unit-test-automation-
practical-techniques-for-python-developers-and-testers-1st-edition-
ashwin-pajankar/
textboxfull.com
Python for Data Science 2nd Edition John Paul Mueller
https://textbookfull.com/product/python-for-data-science-2nd-edition-
john-paul-mueller/
textboxfull.com
https://textbookfull.com/product/python-digital-forensics-cookbook-
effective-python-recipes-for-digital-investigations-1st-edition-
preston-miller/
textboxfull.com
https://textbookfull.com/product/data-visualization-with-python-and-
javascript-scrape-clean-explore-transform-your-data-1st-edition-kyran-
dale/
textboxfull.com
https://textbookfull.com/product/effective-python-90-specific-ways-to-
write-better-python-2nd-edition-brett-slatkin/
textboxfull.com
Matplotlib for Python Developers
Second Edition
BIRMINGHAM - MUMBAI
Matplotlib for Python
Developers Second Edition
Copyright © 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the publisher,
except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express
or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held
liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and
products mentioned in this book by the appropriate use of capitals. However, Packt Publishing
cannot guarantee the accuracy of this information.
www.packtpub.com
Cancer has taken away my grandfather, my aunt, and my friend, I hate cancer. This book is
dedicated to the memory of my grandfather, ChiuKhan Chan, who thought I shouldn’t study that
much. May he rest in peace.
– Aldrin Yim
mapt.io
Great pleasure to work with Allen and Claire. Also special thanks to Mayur and his team for
making the writing process comfortable to us.
I feel honored to take part in this fantastic project. Special thanks to Mayur and Aldrin for leading
the production process. Besides, I wish to thank my fiancée for her love and support. I am also
grateful to be sponsored by the Chevening Scholarship, which is funded by the UK Foreign and
Commonwealth Office (FCO) and partner organizations.
What this book covers
Chapter 1 , Introduction to Matplotlib, gets you familiar with the
capabilities and functionalities of Matplotlib.
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
Preface
Conventions used
Get in touch
Reviews
1. Introduction to Matplotlib
What is Matplotlib?
Merits of Matplotlib
Easy to use
codec
Changes in default styles
Raster images
Vector images
Setting up Matplotlib
Installing Python
Installing Matplotlib
manager
server
Editing and running code
Documenting in Markdown
Summary
Loading data
List
NumPy array
pandas DataFrame
Line plot
Scatter plot
Multiline plots
Adding a grid
Adding a title
Adding a legend
A complete example
Jupyter support
Configuring Matplotlib
Summary
3. Decorating Graphs with Plot Styles and Types
Depth of grayscale
Colormaps
Marker styles
arguments
Line styles
Color
Line thickness
Dash patterns
Designing a custom dash style
Cap styles
Spines
Histogram
Bar plot
multivariate data
Mean-and-error plots
Pie chart
Polar chart
Font
Mathematical notations
Mathtext
LaTeX support
External text renderer
Arrows
Keeping it simple
Summary
4. Advanced Matplotlib
Drawing Subplots
with plt.subplot()
with plt.subplots()
Shared axes
Setting the margin with plt.tight_layout()
plt.subplot2grid()
plt.subplots_adjust
with MultipleLocator
plots
clustermap
Image plotting
Financial plotting
Geographical plotting
Basemap
GeoPandas
Summary
Installing Glade
Summary
6. Embedding Matplotlib in Qt 5
Summary
Summary
Installing Docker
Summary
CSV
JSON
Non-interactive backends
Interactive backends
Summary
CORCHORUS CAPSULARIS.
On the 16th of October I left Macao for the “Cum, sing, moon,”
and the following morning sailed in the Lady Hayes, Captain Hector,
for Whampoa, which afforded me an excellent opportunity of
viewing the scenery of the river. We passed the island of Lintin, off
which, (in the roadstead, on the north-west side,) a number of ships
were lying at anchor. About ten p.m. we anchored off Chuen, pee, for
the night. On the morning following, as soon as the tide was
favourable, we were again under weigh, and about noon passed,
with a light, but favourable breeze, the Bocca Tigris, and entered the
river. This entrance to a very magnificent and extensive stream, is
capable of being very strongly fortified. The Chinese have forts,
mounting a great number of cannon, erected on each side of the
passage: they excited some degree of interest in our minds, as being
those silenced by the broadside of his Majesty’s ship Alceste, some
years since; a triumph of British firmness over Chinese impudence.
The country about Chuen, pee had a picturesque appearance; but
although we hear so much related about the Chinese cultivating
every spot of land, not leaving even the most barren spots
unoccupied, in few countries have I seen more land left waste, much
of which has an appearance of fertility: the valleys certainly were
cultivated, and had an animated and pleasing feature in the
landscape from the vivid green of the numerous plantations of what
seemed to be sugar-cane scattered about. But with this exception,
and the neat cottages nearly buried in the foliage of the trees
surrounding them, there was no interesting view: the elevated land
was, principally bare, barren, and uncultivated.
On entering the river, the scenery was very pleasing; the banks
were low, and, for the most part, under rice cultivation, which, still
retaining its green tinge, imparted a luxuriant and animating beauty
to the view. Small huts were scattered about, over which the
graceful bamboo waved its towering stem; the high and wooded hills
arose in the distance of the back ground of the landscape; and this,
with boats passing about the intersecting canals of the paddy-fields,
formed the principal feature of the country about the Canton river to
Whampoa, where we arrived in the evening,[34] and left in a boat for
Canton (a distance of twelve miles) on the following day.
The scene at Whampoa, with so large a number of shipping
collected together, was remarkably animating; and at this season,
there was a noble addition of most of the ships of the Honourable
East India Company, the finest class of merchant-ships in the world.
On proceeding from Whampoa to Canton, the banks of the river
were flat, and cultivated with wooded hills in the distance, villages,
pagodas,[35] which formed, in combination, some very interesting
scenery. As we approached Canton, the bustle and multitude of
boats increased upon the river: these boats contained whole
families, who had been born and bred in them. They could often be
seen containing the young sprawling infant, just able to walk, the
new-born infant, and the aged grandmother, all reared in this
confined space; but at the same time, the people wore an
appearance of happiness and content upon their countenances, in
spite of their squalid misery. They keep their boats, in a very neat
and clean condition, which certainly confers some degree of credit
upon the people. The flag-staffs and the noble pile of buildings,
forming the factories of the different nations, appeared to our view;
and, arriving soon after, I called upon and remained during my
residence in Canton with my friend, Mr. Whiteman.
Canton is generally said to possess but little, in the confined spot
allotted to the range of Europeans, to interest the stranger. This may
be partially correct; but still the peculiar customs of the people and
the range of the suburbs may afford many days of amusement,
being novel, and unlike what is seen in any other country in the
world. The range of factories or Hongs belonging to different
nations, having flag-staffs, on which the national colours are hoisted
from sunrise to sunset, are fine buildings, more especially those
belonging to the English East India Company, which are of greater
extent than the whole of the others. Several weeping willows are
planted about the open space near the river, in front of the factories.
The English and Dutch hongs have neat gardens, laid out for a
promenade, in front of them; but the open space before most of the
others forms the “quarter-deck,” where every evening the European
residents take their limited walk.
The weather in front of the factories is usually at this season of
the year sultry, but on entering the alleys of the hongs, cold currents
of air are felt pouring down upon the just heated frame. A sudden
atmospherical change very frequently occurs, which certainly cannot
be regarded as conducive to health, but, on the contrary, must prove
highly detrimental: from the little ill-effects experienced from this by
the residents, all that can be said on the subject is, that they
probably get habituated to the frequent vicissitudes. There are two
broad paved streets,[36] filled with shops, in which every description
of manufactured articles, both after European and China patterns,
can be purchased. Here are contained a profusion of specimens of
the arts, more particularly those of ivory, tortoiseshell, and lacquered
ware,[37] tempting to the visitor, and which soon cause him to return
from Canton very deficient in the dollars he had brought with him.
In front of one of the shops was a lacquered board, upon which,
in golden letters, was the following attraction for Jack, who may be
accidentally rolling by the shop:—“The Sailor’s Coffee Shop, Chan
Lung, No. 10, New China Street, where all kinds of silks and teas are
sold, and goods of every description for seamen. Sailors! you are
invited to try this shop, where you will find honest dealing, and
where you can have ready made coffee and tea, but no samshoo.”
The rooms, for this purpose, were very neat, with small couches for
honest and sober Jack to recline upon, some pamphlets and tracts to
amuse his mind as he sipped the decoction of the Indian berry; the
shop contained straw hats, various portraits, and coarse articles of
Chinese manufacture, tempting him to purchase for his friends and
acquaintances at home; and the owner appeared to be an intelligent
man. Eatables are seen carried about the streets in great numbers,
and of all descriptions. Dogs, cats, rats, living and dead; with fowls,
ducks, and other kinds of poultry, as well as living eels, carp, &c. in
buckets of water: the latter are fed and fattened in stews, and taken
out for sale when considered in a sufficiently prime state; the fresh
water fish are very insipid in taste.
Every thing living or dead, organic or inorganic, is sold by weight
in this celestial country, whether it be fruit or ballast stones, oil or
vegetables, living dogs or pigs, cats or poultry, they are all
purchased by the catty. The dogs and pussies are highly esteemed
by the Chinese, who convert them into delicious (according to their
organs of taste) bow-wow soup, and rich pussy broth. A Chinese
does not appear to have any idea of measurement, for one was
asked whether we should have much wind—“Yes, plenty catties of
wind, by, by, come;” and when some gentlemen were taking
observations of the sun, the Chinese observed upon them, that “they
were weighing the sun.” Eating shops are very numerous in the
suburbs of Canton, containing an immense number of made dishes,
and decorated also with enormous fat pigs, varnished over, and
pendent from different parts of the shops, together with varnished
ducks and geese; the latter birds are also dried and pressed, and
then have a curious appearance.
One evening I visited the celebrated Fa, tee gardens, which are
situated a short distance up the river, and on the opposite side to
that upon which Canton is situated. On visiting these nursery
gardens I certainly expected to have seen a splendid collection of
Chinese plants and flowers, but I was sadly disappointed; the worst
nursery garden in any of the provincial towns in Great Britain, was
far, very far beyond any of these, both in size, extent, display of
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com