Matplotlib for Python Developers: Effective techniques for data visualization with Python [2 ed.] 9781788625173, 5019633101539, 178862517X

Leverage the power of Matplotlib to visualize and understand your data more effectivelyKey Features Perform effective da

865 84 29MB

English Pages 300 Year 2018

Report DMCA / Copyright

DOWNLOAD FILE

Matplotlib for Python Developers: Effective techniques for data visualization with Python [2 ed.]
 9781788625173, 5019633101539, 178862517X

Table of contents :
Cover
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Table of Contents
Preface
Chapter 1: Introduction to Matplotlib
What is Matplotlib?
Merits of Matplotlib
Easy to use
Diverse plot types
Hackable to the core (only when you want)
Open source and community support
What's new in Matplotlib 2.x?
Improved functionality and performance
Improved color conversion API and RGBA support
Improved image support
Faster text rendering
Change in the default animation codec
Changes in default styles
Matplotlib website and online documentation. Output formats and backends Static output formats
Raster images
Vector images
Setting up Matplotlib
Installing Python
Python installation for Windows
Python installation for macOS
Python installation for Linux
Installing Matplotlib
About the dependencies
Installing the pip Python package manager
Installing Matplotlib with pip
Setting up Jupyter Notebook
Starting a Jupyter Notebook session
Running Jupyter Notebook on a remote server
Editing and running code
Manipulating notebook kernel and cells
Embed your Matplotlib plots
Documenting in Markdown
Save your hard work! Interactive navigation toolbarConfiguring Matplotlib
Configuring within Python code
Reverting to default settings
Global setting via configuration rc file
Finding the rc configuration file
Editing the rc configuration file
Summary
Chapter 3: Decorating Graphs with Plot Styles and Types
Controlling the colors
Default color cycle
Single-lettered abbreviations for basic colors
Standard HTML color names
RGB or RGBA color code
Hexadecimal color code
Depth of grayscale
Colormaps
Creating custom colormaps
Line and marker styles
Marker styles
Choosing the shape of markers. Using custom characters as markersAdjusting marker sizes and colors
Fine-tuning marker styles with keyword arguments
Line styles
Color
Line thickness
Dash patterns
Designing a custom dash style
Cap styles
Spines
More native Matplotlib plot types
Choosing the right plot
Histogram
Bar plot
Setting bar plot properties
Drawing bar plots with error bars using multivariate data
Mean-and-error plots
Pie chart
Polar chart
Controlling radial and angular grids
Text and annotations
Adding text annotations
Font
Mathematical notations
Mathtext
LaTeX support
External text renderer.

Polecaj historie