Figure Aesthetics

Now that you have entered the world of Matplotlib, surely you will want more than plain boring figures that look all the same. This chapter talks about the aesthetics of a figure. We introduce the structure and components of a Matplotlib figure and how to style these details. In this chapter, you will learn how to make a figure stylish, professional, and genuinely yours.

Here are the topics covered in this chapter:

  • Basic structure and terminologies of a Matplotlib figure
  • Setting colors in Matplotlib
  • Adjusting text formats
  • Lines and markers
    • Customizing line styles
    • Customizing marker styles
  • Grids, ticks, and axes
    • Adding and adjusting grid lines
    • Adjusting tick spacing
    • Customizing tick formatters
    • Adding axes labeling

Get Matplotlib 2.x By Example 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.