更新时间:2021-08-27 18:48:52
封面
Title Page
Copyright and Credits
Matplotlib for Python Developers Second Edition
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
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!
Summary
Getting Started with Matplotlib
Loading data
List
NumPy array
pandas DataFrame
Our first plots with Matplotlib
Importing the pyplot
Line plot
Scatter plot
Overlaying multiple data series in a plot
Multiline plots
Scatter plot to show clusters
Adding a trendline over a scatter plot
Adjusting axes grids labels titles and legends
Adjusting axis limits
Adding axis labels
Adding a grid
Titles and legends
Adding a title
Adding a legend
A complete example
Saving plots to a file
Setting the output format
Setting the figure resolution
Jupyter support
Interactive navigation toolbar
Configuring 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
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