万本电子书0元读

万本电子书0元读

顶部广告

Matplotlib 2.x By Example电子书

售       价:¥

14人正在读 | 0人评论 9.8

作       者:Allen Yu,Claire Chung,Aldrin Yim

出  版  社:Packt Publishing

出版时间:2017-08-28

字       数:30.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Unlock deeper insights into visualization in form of 2D and 3D graphs using Matplotlib 2.x About This Book ? Create and customize live graphs, by adding style, color, font to make appealing graphs. ? A complete guide with insightful use cases and examples to perform data visualizations with Matplotlib's extensive toolkits. ? Create timestamp data visualizations on 2D and 3D graphs in form of plots, histogram, bar charts, scatterplots and more. Who This Book Is For This book is for anyone interested in data visualization, to get insights from big data with Python and Matplotlib 2.x. With this book you will be able to extend your knowledge and learn how to use python code in order to visualize your data with Matplotlib. Basic knowledge of Python is expected. What You Will Learn ? Familiarize with the latest features in Matplotlib 2.x ? Create data visualizations on 2D and 3D charts in the form of bar charts, bubble charts, heat maps, histograms, scatter plots, stacked area charts, swarm plots and many more. ? Make clear and appealing figures for scientific publications. ? Create interactive charts and animation. ? Extend the functionalities of Matplotlib with third-party packages, such as Basemap, GeoPandas, Mplot3d, Pandas, Scikit-learn, and Seaborn. ? Design intuitive infographics for effective storytelling. In Detail Big data analytics are driving innovations in scientific research, digital marketing, policy-making and much more. Matplotlib offers simple but powerful plotting interface, versatile plot types and robust customization. Matplotlib 2.x By Example illustrates the methods and applications of various plot types through real world examples. It begins by giving readers the basic know-how on how to create and customize plots by Matplotlib. It further covers how to plot different types of economic data in the form of 2D and 3D graphs, which give insights from a deluge of data from public repositories, such as Quandl Finance. You will learn to visualize geographical data on maps and implement interactive charts. By the end of this book, you will become well versed with Matplotlib in your day-to-day work to perform advanced data visualization. This book will guide you to prepare high quality figures for manu*s and presentations. You will learn to create intuitive info-graphics and reshaping your message crisply understandable. Style and approach Step by step comprehensive guide filled with real world examples.
目录展开

Title Page

Title Page

Copyright

Copyright

Matplotlib 2.x By Example

Matplotlib 2.x By Example

Credits

Credits

About the Authors

About the Authors

About the Reviewer

About the Reviewer

www.PacktPub.com

www.PacktPub.com

Why subscribe?

Why subscribe?

Customer Feedback

Customer Feedback

Preface

Preface

What this book covers

What this book covers

What you need for this book

What you need for this book

Who this book is for

Who this book is for

Conventions

Conventions

Reader feedback

Reader feedback

Customer support

Customer support

Downloading the example code

Downloading the example code

Downloading the color images of this book

Downloading the color images of this book

Errata

Errata

Piracy

Piracy

Questions

Questions

Hello Plotting World!

Hello Plotting World!

Hello Matplotlib!

Hello Matplotlib!

What is Matplotlib?

What is Matplotlib?

What's new in Matplotlib 2.0?

What's new in Matplotlib 2.0?

Changes to the default style

Changes to the default style

Color cycle

Color cycle

Colormap

Colormap

Scatter plot

Scatter plot

Legend

Legend

Line style

Line style

Patch edges and color

Patch edges and color

Fonts

Fonts

Improved functionality or performance

Improved functionality or performance

Improved color conversion API and RGBA support

Improved color conversion API and RGBA support

Improved image support

Improved image support

Faster text rendering

Faster text rendering

Change in the default animation codec

Change in the default animation codec

Changes in settings

Changes in settings

New configuration parameters (rcParams)

New configuration parameters (rcParams)

Style parameter blacklist

Style parameter blacklist

Change in Axes property keywords

Change in Axes property keywords

Setting up the plotting environment

Setting up the plotting environment

Setting up Python

Setting up Python

Windows

Windows

Using Python

Using Python

macOS

macOS

Linux

Linux

Installing the Matplotlib dependencies

Installing the Matplotlib dependencies

Installing the pip Python package manager

Installing the pip Python package manager

Installing Matplotlib with pip

Installing Matplotlib with pip

Setting up Jupyter notebook

Setting up Jupyter notebook

Why Jupyter notebook?

Why Jupyter notebook?

Installing Jupyter notebook

Installing Jupyter notebook

Using Jupyter notebook

Using Jupyter notebook

Starting a Jupyter notebook session

Starting a Jupyter notebook session

Editing and running code

Editing and running code

Jotting down notes in Markdown mode

Jotting down notes in Markdown mode

Viewing Matplotlib plots

Viewing Matplotlib plots

Saving the notebook project

Saving the notebook project

All set to go!

All set to go!

Plotting our first graph

Plotting our first graph

Loading data for plotting

Loading data for plotting

Data structures

Data structures

List

List

Numpy array

Numpy array

pandas dataframe

pandas dataframe

Loading data from files

Loading data from files

The basic Python way

The basic Python way

The Numpy way

The Numpy way

The pandas way

The pandas way

Importing the Matplotlib pyplot module

Importing the Matplotlib pyplot module

Plotting a curve

Plotting a curve

Viewing the figure

Viewing the figure

Saving the figure

Saving the figure

Setting the output format

Setting the output format

PNG (Portable Network Graphics)

PNG (Portable Network Graphics)

PDF (Portable Document Format)

PDF (Portable Document Format)

SVG (Scalable Vector Graphics)

SVG (Scalable Vector Graphics)

Post (Postscript)

Post (Postscript)

Adjusting the resolution

Adjusting the resolution

Summary

Summary

Figure Aesthetics

Figure Aesthetics

Basic structure of a Matplotlib figure

Basic structure of a Matplotlib figure

Glossary of objects in a Matplotlib figure

Glossary of objects in a Matplotlib figure

Setting colors in Matplotlib

Setting colors in Matplotlib

Single letters for basic built-in colors

Single letters for basic built-in colors

Names of standard HTML colors

Names of standard HTML colors

RGB or RGBA color code

RGB or RGBA color code

Hexadecimal color code

Hexadecimal color code

Depth of grayscale

Depth of grayscale

Using specific colors in the color cycle

Using specific colors in the color cycle

Aesthetic and readability considerations

Aesthetic and readability considerations

Adjusting text formats

Adjusting text formats

Font

Font

Font appearance

Font appearance

Font size

Font size

Font style

Font style

Font weight

Font weight

Font family

Font family

Checking available fonts in system

Checking available fonts in system

LaTeX support

LaTeX support

Customizing lines and markers

Customizing lines and markers

Lines

Lines

Choosing dash patterns

Choosing dash patterns

Setting capstyle of dashes

Setting capstyle of dashes

Advanced example

Advanced example

Markers

Markers

Choosing markers

Choosing markers

Adjusting marker sizes

Adjusting marker sizes

Customizing grids, ticks, and axes

Customizing grids, ticks, and axes

Grids

Grids

Adding grids

Adding grids

Ticks

Ticks

Adjusting tick spacing

Adjusting tick spacing

Removing ticks

Removing ticks

Drawing ticks in multiples

Drawing ticks in multiples

Automatic tick settings

Automatic tick settings

Setting ticks by the number of data points

Setting ticks by the number of data points

Set scaling of ticks by mathematical functions

Set scaling of ticks by mathematical functions

Locating ticks by datetime

Locating ticks by datetime

Customizing tick formats

Customizing tick formats

Removing tick labels

Removing tick labels

Fixing labels

Fixing labels

Setting labels with strings

Setting labels with strings

Setting labels with user-defined functions

Setting labels with user-defined functions

Formatting axes by numerical values

Formatting axes by numerical values

Setting label sizes

Setting label sizes

Trying out the ticker locator and formatter

Trying out the ticker locator and formatter

Rotating tick labels

Rotating tick labels

Axes

Axes

Nonlinear axis

Nonlinear axis

Logarithmic scale

Logarithmic scale

Changing the base of the log scale

Changing the base of the log scale

Advanced example

Advanced example

Symmetrical logarithmic scale

Symmetrical logarithmic scale

Logit scale

Logit scale

Using style sheets

Using style sheets

Applying a style sheet

Applying a style sheet

Resetting to default styles

Resetting to default styles

Customizing a style sheet

Customizing a style sheet

Title and legend

Title and legend

Adding a title to your figure

Adding a title to your figure

Adding a legend

Adding a legend

Test your skills

Test your skills

Summary

Summary

Figure Layout and Annotations

Figure Layout and Annotations

Adjusting the layout

Adjusting the layout

Adjusting the size of the figure

Adjusting the size of the figure

Adjusting spines

Adjusting spines

Adding subplots

Adding subplots

Adding subplots using pyplot.subplot

Adding subplots using pyplot.subplot

Using pyplot.subplots() to specify handles

Using pyplot.subplots() to specify handles

Sharing axes between subplots

Sharing axes between subplots

Adjusting margins

Adjusting margins

Setting dimensions when adding subplot axes with figure.add_axes

Setting dimensions when adding subplot axes with figure.add_axes

Modifying subplot axes dimensions via pyplot.subplots_adjust

Modifying subplot axes dimensions via pyplot.subplots_adjust

Aligning subplots with pyplot.tight_layout

Aligning subplots with pyplot.tight_layout

Auto-aligning figure elements with pyplot.tight_layout

Auto-aligning figure elements with pyplot.tight_layout

Stacking subplots of different dimensions with subplot2grid

Stacking subplots of different dimensions with subplot2grid

Drawing inset plots

Drawing inset plots

Drawing a basic inset plot

Drawing a basic inset plot

Using inset_axes

Using inset_axes

Annotations

Annotations

Adding text annotations

Adding text annotations

Adding text and arrows with axis.annotate

Adding text and arrows with axis.annotate

Adding a textbox with axis.text

Adding a textbox with axis.text

Adding arrows

Adding arrows

Labeling data values on a bar chart

Labeling data values on a bar chart

Adding graphical annotations

Adding graphical annotations

Adding shapes

Adding shapes

Adding image annotations

Adding image annotations

Summary

Summary

Visualizing Online Data

Visualizing Online Data

Typical API data formats

Typical API data formats

CSV

CSV

JSON

JSON

XML

XML

Introducing pandas

Introducing pandas

Importing online population data in the CSV format

Importing online population data in the CSV format

Importing online financial data in the JSON format

Importing online financial data in the JSON format

Visualizing the trend of data

Visualizing the trend of data

Area chart and stacked area chart

Area chart and stacked area chart

Introducing Seaborn

Introducing Seaborn

Visualizing univariate distribution

Visualizing univariate distribution

Bar chart in Seaborn

Bar chart in Seaborn

Histogram and distribution fitting in Seaborn

Histogram and distribution fitting in Seaborn

Visualizing a bivariate distribution

Visualizing a bivariate distribution

Scatter plot in Seaborn

Scatter plot in Seaborn

Visualizing categorical data

Visualizing categorical data

Categorical scatter plot

Categorical scatter plot

Strip plot and swarm plot

Strip plot and swarm plot

Box plot and violin plot

Box plot and violin plot

Controlling Seaborn figure aesthetics

Controlling Seaborn figure aesthetics

Preset themes

Preset themes

Removing spines from the figure

Removing spines from the figure

Changing the size of the figure

Changing the size of the figure

Fine-tuning the style of the figure

Fine-tuning the style of the figure

More about colors

More about colors

Color scheme and color palettes

Color scheme and color palettes

Summary

Summary

Visualizing Multivariate Data

Visualizing Multivariate Data

Getting End-of-Day (EOD) stock data from Quandl

Getting End-of-Day (EOD) stock data from Quandl

Grouping the companies by industry

Grouping the companies by industry

Converting the date to a supported format

Converting the date to a supported format

Getting the percentage change of the closing price

Getting the percentage change of the closing price

Two-dimensional faceted plots

Two-dimensional faceted plots

Factor plot in Seaborn

Factor plot in Seaborn

Faceted grid in Seaborn

Faceted grid in Seaborn

Pair plot in Seaborn

Pair plot in Seaborn

Other two-dimensional multivariate plots

Other two-dimensional multivariate plots

Heatmap in Seaborn

Heatmap in Seaborn

Candlestick plot in matplotlib.finance

Candlestick plot in matplotlib.finance

Visualizing various stock market indicators

Visualizing various stock market indicators

Building a comprehensive stock chart

Building a comprehensive stock chart

Three-dimensional (3D) plots

Three-dimensional (3D) plots

3D scatter plot

3D scatter plot

3D bar chart

3D bar chart

Caveats of Matplotlib 3D

Caveats of Matplotlib 3D

Summary

Summary

Adding Interactivity and Animating Plots

Adding Interactivity and Animating Plots

Scraping information from websites

Scraping information from websites

Non-interactive backends

Non-interactive backends

Interactive backends

Interactive backends

Tkinter-based backend

Tkinter-based backend

Interactive backend for Jupyter Notebook

Interactive backend for Jupyter Notebook

Plot.ly-based backend

Plot.ly-based backend

Creating animated plots

Creating animated plots

Installation of FFmpeg

Installation of FFmpeg

Creating animations

Creating animations

Summary

Summary

A Practical Guide to Scientific Plotting

A Practical Guide to Scientific Plotting

General rules of effective visualization

General rules of effective visualization

Planning your figure

Planning your figure

Do we need the plot?

Do we need the plot?

Choosing the right plot

Choosing the right plot

Targeting your audience

Targeting your audience

Crafting your graph

Crafting your graph

The science of visual perception

The science of visual perception

The Gestalt principles of visual perception

The Gestalt principles of visual perception

Getting organized

Getting organized

Ordering plots and data series logically

Ordering plots and data series logically

Grouping

Grouping

Giving emphasis and avoiding clutter

Giving emphasis and avoiding clutter

Color and hue

Color and hue

Size and weight

Size and weight

Spacing

Spacing

Typography

Typography

Use minimal marker shapes

Use minimal marker shapes

Styling plots for slideshows, posters, and journal articles

Styling plots for slideshows, posters, and journal articles

Display time

Display time

Space allowed

Space allowed

Distance from the audience

Distance from the audience

Adaptations

Adaptations

Summary of styling plots for slideshows, posters, and journal articles

Summary of styling plots for slideshows, posters, and journal articles

Visualizing statistical data more intuitively

Visualizing statistical data more intuitively

Stacked bar chart and layered histogram

Stacked bar chart and layered histogram

Replacing bar charts with mean-and-error plots

Replacing bar charts with mean-and-error plots

Indicating statistical significance

Indicating statistical significance

Methods for dimensions reduction

Methods for dimensions reduction

Principal Component Analysis (PCA)

Principal Component Analysis (PCA)

t-distributed Stochastic Neighbor Embedding (t-SNE)

t-distributed Stochastic Neighbor Embedding (t-SNE)

Summary

Summary

Exploratory Data Analytics and Infographics

Exploratory Data Analytics and Infographics

Visualizing population health information

Visualizing population health information

Map-based visualization for geographical data

Map-based visualization for geographical data

Combining geographical and population health data

Combining geographical and population health data

Survival data analysis on cancer

Survival data analysis on cancer

Summary

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部