更新时间:2021-07-02 19:35:17
cover
Title Page
Copyright
Matplotlib 2.x By Example
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Hello Plotting World!
Hello Matplotlib!
What is Matplotlib?
What's new in Matplotlib 2.0?
Changes to the default style
Color cycle
Colormap
Scatter plot
Legend
Line style
Patch edges and color
Fonts
Improved functionality or performance
Improved color conversion API and RGBA support
Improved image support
Faster text rendering
Change in the default animation codec
Changes in settings
New configuration parameters (rcParams)
Style parameter blacklist
Change in Axes property keywords
Setting up the plotting environment
Setting up Python
Windows
Using Python
macOS
Linux
Installing the Matplotlib dependencies
Installing the pip Python package manager
Installing Matplotlib with pip
Setting up Jupyter notebook
Why Jupyter notebook?
Installing Jupyter notebook
Using Jupyter notebook
Starting a Jupyter notebook session
Editing and running code
Jotting down notes in Markdown mode
Viewing Matplotlib plots
Saving the notebook project
All set to go!
Plotting our first graph
Loading data for plotting
Data structures
List
Numpy array
pandas dataframe
Loading data from files
The basic Python way
The Numpy way
The pandas way
Importing the Matplotlib pyplot module
Plotting a curve
Viewing the figure
Saving the figure
Setting the output format
PNG (Portable Network Graphics)
PDF (Portable Document Format)
SVG (Scalable Vector Graphics)
Post (Postscript)
Adjusting the resolution
Summary
Figure Aesthetics
Basic structure of a Matplotlib figure
Glossary of objects in a Matplotlib figure
Setting colors in Matplotlib
Single letters for basic built-in colors
Names of standard HTML colors
RGB or RGBA color code
Hexadecimal color code
Depth of grayscale
Using specific colors in the color cycle
Aesthetic and readability considerations
Adjusting text formats
Font
Font appearance
Font size
Font style
Font weight