Matplotlib: Visualizing Data in Python

Shriira Press

Preface

A comprehensive, self-contained guide to Matplotlib, the foundational plotting library of the Python scientific and data ecosystem — the tool that…

Welcome to Matplotlib: Visualizing Data in Python.

A comprehensive, self-contained guide to Matplotlib, the foundational plotting library of the Python scientific and data ecosystem — the tool that turns arrays of numbers into figures you can see, reason about, and publish. Nearly every chart in a Python data-science or machine-learning workflow is drawn by Matplotlib (directly, or through libraries built on it). This book teaches it from first principles: the Figure/Axes architecture and the two APIs, the full catalog of plot types, customization and layout, images and colormaps, themes, 3D and animation, the ecosystem (seaborn and friends), and the craft of making figures that are clear, honest, and publication-ready. It blends intuition, the concepts behind the API, and runnable code.

This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.

A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.

We hope it serves you well.

— Shriira Press

Contents

  1. Chapter 1 — What Is Matplotlib?
  2. Chapter 2 — The Anatomy of a Figure: Figure, Axes, and the Two APIs
  3. Chapter 3 — Your First Plots: Line, Scatter, and Bar
  4. Chapter 4 — Statistical and Distribution Plots
  5. Chapter 5 — Plotting from Data: NumPy and pandas
  6. Chapter 6 — Images, Colormaps, and Heatmaps
  7. Chapter 7 — Styling Plots: Colors, Lines, Markers, and Text
  8. Chapter 8 — Axes, Scales, Ticks, and Dates
  9. Chapter 9 — Subplots and Layout
  10. Chapter 10 — Themes, Styles, and rcParams
  11. Chapter 11 — 3D, Animation, and Interactivity
  12. Chapter 12 — The Ecosystem: seaborn, pandas, and beyond
  13. Chapter 13 — Publication, Production, and Best Practices
  14. Appendix A — Glossary and API Quick Reference
  15. Appendix B — Further Reading and Resources
0%
1/1