Detailed explanation and usage of Matplotlib of Python visualization library

        Matplotlib is one of the most commonly used visualization tools in Python, which can easily create massive types of 2D charts and some basic 3D charts. This article mainly recommends a step for learning to use Matplotlib.

The basic premise

If you don't have any foundation other than this article, it is recommended to learn how to use matplotlib in the following steps:

  1. Learn basic matplotlib terminology, especially what are plots and axes

  2. Always use an object-oriented interface, get in the habit of using it from the start

  3. Start your visualization learning with basic pandas plotting

  4. More complex statistical visualization with seaborn

  5. Use matplotlib to customize pandas or seaborn visualization

This picture from matplotlib faq is very classic, it is convenient to understand the different terms of a picture.

        Most of the terms are pretty straightforward, but the main point to remember is that the Figure is the final image, which may contain one or more axes. The axes represent a single division. Once you understand these and how to access them through the object-oriented API, the following steps can begin.

        This knowledge of terminology has another benefit, when you look at something online, you have a starting point. If you take the time to understand this, you will not understand the rest of the matplotlib API. Also, many of python's high-level packages, such as seaborn and ggplot, depend on matplotlib. Therefore, it is easier to learn the more powerful frameworks after knowing these basics.

        at last,

Guess you like

Origin blog.csdn.net/huanxiajioabu/article/details/131376264