Matplotlib 3.0 Cookbook [1 ed.] 1789138663, 9781789138665, 9781789135718

Build attractive, insightful, and powerful visualizations to gain quality insights from your data Key FeaturesMaster Mat

1,646 61 11MB

English Pages 676 Year 2018

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
1: Anatomy of Matplotlib
Introduction
Working in interactive mode
Working in non-interactive mode
Reading from external files and plotting
Changing and resetting default environment variables

2: Getting Started with Basic Plots
Introduction
Line plot
Bar plot
Scatter plot
Bubble plot
Stacked plot
Pie plot
Table chart
Polar plot
Histogram
Box plot
Violin plot
Reading and displaying images
Heatmap
Hinton diagram
Contour plot
Triangulations
Stream plot
Path

3: Plotting Multiple Charts, Subplots, and Figures
Introduction
Plotting multiple graphs on the same axes
Plotting subplots on the same figure
Plotting multiple figures in a session
Logarithmic scale
Using units of measurement

4: Developing Visualizations for Publishing Quality
Introduction
Color, line style, and marker customization
Working with standard colormaps
User-defined colors and colormaps
Working with legend
Customizing labels and titles
Using autoscale and axis limits
Customizing ticks and ticklabels
Customizing spines
Twin axes
Using hatch
Using annotation
Using style sheets

5: Plotting with Object-Oriented API
Introduction
Plotting a correlation matrix using pyplot and object-oriented APIs
Plotting patches using object-oriented API
Plotting collections using object-oriented API

6: Plotting with Advanced Features
Using property cycler
Using Path effects
Using transforms
Taking control of axes positions
GridSpec for figure layout
Using origin and extent for image orientation
Geographical plotting using geopandas

7: Embedding Text and Expressions
Introduction
Using mathematical expressions with a font dictionary
Annotating a point on a polar plot
Using ConnectionPatch
Using a text box
Plotting area under an integral curve
Defining custom markers
Fractions, regular mathematical expressions, and symbols
Word embeddings in two dimensions

8: Saving the Figure in Different Formats
Introduction
Saving the figure in various formats
Avoiding truncation while saving the figure
Saving partial figures
Managing image resolution
Managing transparency for web applications
Creating multi-page PDF reports

9: Developing Interactive Plots
Introduction
Events and callbacks
Widgets
Animation

10: Embedding Plots in a Graphical User Interface
Introduction
Using the Slider and Button Widgets of Matplotlib
Using the Slider and Button widgets of Tkinter GUI
Embedding Matplotlib in a Tkinter GUI application
Using the Slider and Button widgets of WxPython GUI
Embedding Matplotlib in to a wxPython GUI application
Using the Slider and Button widgets of Qt's GUI
Embedding Matplotlib in to a Qt GUI application

11: Plotting 3D Graphs Using the mplot3d Toolkit
Introduction
Line plot
Scatter plot
Bar plot
Polygon plot
Contour plot
Surface plot
Wireframe plot
Triangular surface plot
Plotting 2D data in 3D
3D visualization of linearly non-separable data in 2D
Word embeddings

12: Using the axisartist Toolkit
Introduction
Understanding attributes in axisartist
Defining curvilinear grids in rectangular boxes
Defining polar axes in rectangular boxes
Using floating axes for a rectangular plot
Creating polar axes using floating axes
Plotting planetary system data on floating polar axes

13: Using the axes_grid1 Toolkit
Introduction
Plotting twin axes using the axisartist and axesgrid1 toolkits
Using AxesDivider to plot a scatter plot and associated histograms
Using AxesDivider to plot a colorbar
Using ImageGrid to plot images with a colorbar in a grid
Using inset_locator to zoom in on an image
Using inset_locator to plot inset axes

14: Plotting Geographical Maps Using Cartopy Toolkit
Introduction
Plotting basic map features
Plotting projections
Using grid lines and labels
Plotting locations on the map
Plotting country maps with political boundaries
Plotting country maps using GeoPandas and cartopy
Plotting populated places of the world
Plotting the top five and bottom five populated countries
Plotting temperatures across the globe
Plotting time zones
Plotting an animated map

15: Exploratory Data Analysis Using the Seaborn Toolkit
Introduction
Relational plots
Categorical plots
Distribution plots
Regression plots
Multi-plot grids
Matrix plots

Matplotlib 3.0 Cookbook [1 ed.]
 1789138663, 9781789138665, 9781789135718

  • Commentary
  • Converted
  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers