Book description
Build attractive, insightful, and powerful visualizations to gain quality insights from your data
Key Features
- Master Matplotlib for data visualization
- Customize basic plots to make and deploy figures in cloud environments
- Explore recipes to design various data visualizations from simple bar charts to advanced 3D plots
Book Description
Matplotlib provides a large library of customizable plots, along with a comprehensive set of backends. Matplotlib 3.0 Cookbook is your hands-on guide to exploring the world of Matplotlib, and covers the most effective plotting packages for Python 3.7.
With the help of this cookbook, you'll be able to tackle any problem you might come across while designing attractive, insightful data visualizations. With the help of over 150 recipes, you'll learn how to develop plots related to business intelligence, data science, and engineering disciplines with highly detailed visualizations. Once you've familiarized yourself with the fundamentals, you'll move on to developing professional dashboards with a wide variety of graphs and sophisticated grid layouts in 2D and 3D. You'll annotate and add rich text to the plots, enabling the creation of a business storyline. In addition to this, you'll learn how to save figures and animations in various formats for downstream deployment, followed by extending the functionality offered by various internal and third-party toolkits, such as axisartist, axes_grid, Cartopy, and Seaborn.
By the end of this book, you'll be able to create high-quality customized plots and deploy them on the web and on supported GUI applications such as Tkinter, Qt 5, and wxPython by implementing real-world use cases and examples.
What you will learn
- Develop simple to advanced data visualizations in Matplotlib
- Use the pyplot API to quickly develop and deploy different plots
- Use object-oriented APIs for maximum flexibility with the customization of figures
- Develop interactive plots with animation and widgets
- Use maps for geographical plotting
- Enrich your visualizations using embedded texts and mathematical expressions
- Embed Matplotlib plots into other GUIs used for developing applications
- Use toolkits such as axisartist, axes_grid1, and cartopy to extend the base functionality of Matplotlib
Who this book is for
The Matplotlib 3.0 Cookbook is for you if you are a data analyst, data scientist, or Python developer looking for quick recipes for a multitude of visualizations. This book is also for those who want to build variations of interactive visualizations.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- Anatomy of Matplotlib
- Getting Started with Basic Plots
- Plotting Multiple Charts, Subplots, and Figures
-
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
- Plotting with Object-Oriented API
- Plotting with Advanced Features
- Embedding Text and Expressions
- Saving the Figure in Different Formats
-
Developing Interactive Plots
- Introduction
- Events and callbacks
- Widgets
- Animation
-
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
- Plotting 3D Graphs Using the mplot3d Toolkit
- Using the axisartist Toolkit
-
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
-
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
- Exploratory Data Analysis Using the Seaborn Toolkit
- Other Books You May Enjoy
Product information
- Title: Matplotlib 3.0 Cookbook
- Author(s):
- Release date: October 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789135718
You might also like
book
Hands-on Matplotlib: Learn Plotting and Visualizations with Python 3
Learn the core aspects of NumPy, Matplotlib, and Pandas, and use them to write programs with …
book
Python Cookbook, 3rd Edition
If you need help writing programs in Python 3, or want to update older Python 2 …
book
Modern Python Cookbook - Second Edition
Complete recipes spread across 15 chapters to help you overcome commonly faced issues by Python for …
book
Pandas 1.x Cookbook - Second Edition
Use the power of pandas to solve most complex scientific computing problems with ease. Revised for …