© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. PajankarHands-on Matplotlibhttps://doi.org/10.1007/978-1-4842-7410-1_10

10. Working with Colors

Ashwin Pajankar1  
(1)
Nashik, Maharashtra, India
 

In the previous chapter, you learned how to visualize pie charts and polar charts with Matplotlib.

In this chapter, you will learn how to work with colors. The following are the routines you will learn to use in this chapter:
  • pcolor()

  • pcolormesh()

  • colorbar()

After reading this chapter, we will be able to work with colors in Matplotlib.

pcolor()

The routine pcolor() creates a pseudocolor plot with a rectangular (nonsquare) grid. Pseudocolor means the object or image is rendered in colors different than those in which it ...

Get Hands-on Matplotlib: Learn Plotting and Visualizations with Python 3 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.