Python Data Visualization Programming in Practice cover

Python Data Visualization Programming in Practice

Rating 3.6
Chapters
8
ISBN
9787115384393

Tags

Summary

This is a hands-on guide to data visualization programming using Python. Centered on matplotlib and its companion scientific computing libraries (NumPy, SciPy, PIL, etc.), it walks through the complete visualization workflow—reading data, cleaning data, plotting and presenting, and adjusting and refining—starting from setting up the development environment. The book first covers importing data from local files, remote requests, CSV and JSON, and relational databases, explaining the basics of loading and organizing data. It then uses reproducible small examples to demonstrate how to draw line charts, bar charts, scatter plots, pie charts, histograms, and other common chart types, and introduces customization of titles, axes, ticks, legends, color schemes, and styles. The advanced section further covers 3D visualization, drawing charts with images and maps (including geographic data presentation), animation and interactive effects, and how to choose the right chart to express a point based on data type and analytical purpose. The book has 8 chapters organized as "preparing the working environment, understanding data, drawing and customizing charts, learning more charts and customization, creating 3D visualization charts, drawing charts with images and maps, using the right charts to understand data, and more matplotlib knowledge," presenting visualization effects through more than 60 methods. It adopts a "problem—solution—code—explanation" recipe format, so readers can experiment by following the code or look up specific techniques as needed. It is a tool-manual-style book for beginners through intermediate users.

Editor's review

很多数据可视化书讲「原理」,这本书更偏向「动手做出图」。它以 matplotlib 为核心,把数据读取与清洗、图形绘制、样式定制、三维与地图呈现串成一条完整链路,每个知识点都配成可直接跑通的代码案例,读的时候一边敲一边看效果,学习节奏很快。条目式「步骤+说明」的写法让它同时具备教程和查询手册两种属性:初学时按章节顺序通读,熟悉之后遇到「刻度怎么调」「地图怎么画」「配色怎么改」这类具体问题,翻开对应小节就能找到答案。书中特别强调「选对图表」这一点,不满足于把图画出来,还会讨论什么样的表达方式更能把数据关系说清楚,这点对做报表和数据分析报告的人比较实用。当然,这本书以 matplotlib 为主导,对 plotly、seaborn、Bokeh 等交互式可视化工具的覆盖有限;且成书较早,部分库的 API 与写法已在后续版本中变化,照着练习时可能需要对照官方文档做少量调整。对已有 Python 基础、希望系统补齐可视化技能的人来说,它仍是一本结构清楚、案例充足的实用参考。

Who it's for

A good fit for

  • 已掌握 Python 基本语法、想系统学习 matplotlib 绘图的开发者
  • 需要做数据报表和可视化呈现的数据分析从业者
  • 做科研或课程作业、需要绘制图表的研究生与高年级本科生
  • 希望用大量小案例快速上手、边学边敲的实践型学习者

Not a good fit for

  • 完全没有 Python 基础、还不理解列表与函数等概念的零基础读者
  • 主要想学 ECharts、D3.js 等前端可视化工具的开发者
  • 期待深入讲解统计学原理与信息设计理论、而非工具操作的读者
  • 需要前沿交互式可视化框架(如 plotly、Bokeh)深度内容的人

Reading tips

  1. 先按第1章把环境配好,确保 matplotlib 能正常出图,再进入后续章节。
  2. 按章节顺序通读一遍,同时把每个案例代码亲手运行一次,观察输出结果。
  3. 图表卡住时再把它当手册用,按「刻度、配色、图例、子图」等关键词跳查对应小节。
  4. 练习时对照当前 matplotlib 官方文档,注意书中较早版本 API 的变化与替代写法。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1 Preparing the Working Environment
  2. Chapter 2 Understanding Data
  3. Chapter 3 Drawing and Customizing Charts
  4. Chapter 4 Learning More Charts and Customization
  5. Chapter 5 Creating 3D Visualization Charts
  6. Chapter 6 Drawing Charts with Images and Maps
  7. Chapter 7 Using the Right Charts to Understand Data
  8. Chapter 8 More matplotlib Knowledge

FAQ

这本书适合 Python 零基础的人吗?
不太适合。书一开始就进入环境配置和库的使用,预设读者已能读写基本 Python 代码、理解函数和模块。若完全没有基础,建议先补完一门 Python 入门课,再来读这本书会顺畅得多。
书中主要用哪个可视化库?
以 matplotlib 为主,配套使用 NumPy、SciPy、PIL 等科学计算与图像处理库,也涉及 requests 获取数据和地图、三维图形的绘制。全书内容主要围绕 matplotlib 展开。
这本书和「第2版」有什么区别?
第1版 2015 年出版,共 8 章,约 60 余种方法;第2版由多位作者合作修订,扩充为 9 章、70 余种方法,新增数据源处理与 Plotly 云端可视化内容。手上是哪一版,按对应版本的章节顺序学习即可。
照着书里的代码运行报错怎么办?
多数是库版本差异造成的 API 变化。建议先确认 Python 与 matplotlib 版本,再查对应版本的官方文档,把旧写法替换为等价的新写法;个别函数被弃用时,可搜索该函数的名称加「deprecated」查找替代方案。
读完能做到什么程度?
可以独立完成常见统计图形的绘制与样式定制,处理 CSV、JSON、数据库等多来源数据,并绘制地图、三维图和简单动画,具备为分析报告和项目制作可读性较高图表的能力。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

More by the same author

Top rated in the same category