Chapter 9: Matplotlib¶
This chapter covers Matplotlib, the core plotting library in Python, including figure and axes objects, plot types (line, scatter, bar, histogram, heatmap, 3D), customization, layout management, and OOP design.
9.1 Introduction¶
- Visualization Libraries
- Python Data Science Ecosystem
- Three Ways of Drawing
- Five Major Objects
- Interactive Mode
9.2 Getting Started¶
9.3 Figure Object¶
9.4 Axes Object¶
9.5 Layout¶
9.6 Line Plot¶
9.7 Axes Customization¶
9.8 Spine and Axis¶
9.9 Text and Annotations¶
9.10 Axes Enhancements¶
- Twin Axes
- Secondary Axes
- Fill and Fill Between
- Axhline and Axvline
- Animation (FuncAnimation)
- Polar Plots
- Quiver Plots
9.11 Histogram¶
9.12 Box Plot¶
- Basic Box Plot
- Box Plot Anatomy
- Box Plot Keywords
- Styling and Colors
- Violin Plot
- Combined Visualizations
9.13 Scatter Plot¶
9.14 Bar Chart¶
9.15 Pie Chart¶
9.16 Heatmap and Colormaps¶
9.17 2D Density Plots¶
9.18 Image Plot¶
9.19 Contour Plot¶
9.20 3D Plot¶
- Creating 3D Axes
- Axes Method - plot (3D Lines)
- Axes Method - plot_surface
- Axes Method - view_init
- Complex Function Visualization