Chapter 4. Working with Figures

In this chapter, we will cover:

  • Compositing multiple figures
  • Scaling both the axes equally
  • Setting an axis range
  • Setting the aspect ratio
  • Inserting subfigures
  • Using a logarithmic scale
  • Using polar coordinates

Introduction

Designing a scientific plotting package is a daunting task—the needs to cover are extremely diverse. On one hand, ideally, creating any kind of figure should be possible with a minimal amount of coding and fiddling around. On the other, we want to be able to customize any aspect of a graphic. Those two goals are diametrically opposed. matplotlib offers a rare balance between the two goals. In this chapter, we will explore ways to modify fundamental aspects of the stock figures, such as changing the coordinate ...

Get matplotlib Plotting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.