当前位置:网站首页>How to learn to understand Matplotlib instead of simple code reuse
How to learn to understand Matplotlib instead of simple code reuse
2022-06-13 02:17:00 【Cloud edge flying elephant】
Study first matplotlib Architecture of
First post the answers I think , Expert detour
Here is learning matplotlib The lesson of vegetable chicken
The following is a reprint
Container layer : Mainly by Canvas、Figure、Axes form .
Canvas It is the system layer at the bottom , Act as a Sketchpad in the process of drawing , That is, place the canvas (Figure) Tools for .
Figure yes Canvas The first floor above , It is also the first layer of the application layer that needs users to operate , Act as a canvas in the process of drawing .
Axes It is the second layer of the application layer , In the process of drawing, it is equivalent to the role of the drawing area on the canvas .
Figure: Refers to the entire graph ( Can pass plt.figure() Set the size and resolution of the canvas )
Axes( Coordinate system ): The drawing area of the data
Axis( Axis ): An axis in the coordinate system , Contains size limits 、 Scales and scale labels
Be careful :
One figure( canvas ) It can contain more than one axes( Coordinate system / Drawing area ), But one axes It can only belong to one figure.
One axes( Coordinate system / Drawing area ) It can contain more than one axis( Axis ), Including two is 2d Coordinate system ,3 One is 3d Coordinate system .
Auxiliary display layer
The auxiliary display layer is Axes( Drawing area ) In addition to the image drawn according to the data , It mainly includes Axes appearance (facecolor)、 Border line (spines)、 Axis (axis)、 Axis name (axis label)、 Coordinate scale (tick)、 Axis scale label (tick label)、 Gridlines (grid)、 legend (legend)、 title (title) The content such as .
The setting of this layer can make the image display more intuitive and easier to be understood by users , But it will not have a substantial impact on the image .
Image layer
Image layer refers to Axes Pass inside plot、scatter、bar、histogram、pie The image drawn by the equal function according to the data .
summary
Canvas( Drawing board ) At the bottom , Users generally do not have access to
Figure( canvas ) Based on the Canvas above
Axes( Drawing area ) Based on the Figure above
Axis (axis)、 legend (legend) The auxiliary display layer and image layer are built on Axes above
————————————————
Copyright notice : This paper is about CSDN Blogger 「xiaoyaGrace」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/xiaoyaGrace/article/details/103627128
The following is my understanding
Some common plt.plot()、plt.bar()、plt.pie() And so on axes Class method , So I just learned matplotlib It is recommended to know which classes there are , What are these classes for , What are the methods
Instead of going there at first plt.plot() Draw some line charts , Take a look at the architecture , Later, I will gradually understand in detail what some parameters do , I think it is helpful to master and skillfully use this tool
边栏推荐
- The commercial value of Kwai is being seen by more and more brands and businesses
- 传感器:MQ-5燃气模块测量燃气值(底部附代码)
- The execution results of i+=2 and i++ i++ under synchronized are different
- Ctrip reshapes new Ctrip
- Area of basic exercise circle ※
- [work notes] the problem of high leakage current in standby mode of dw7888 motor driver chip
- SQLserver2008 拒绝了对对象 '****' (数据库 '****',架构 'dbo')的 SELECT 权限
- C language compressed string is saved to binary file, and the compressed string is read from binary file and decompressed.
- Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation
- Uniapp preview function
猜你喜欢

What are the differences in cache/tlb?

In the third quarter, the revenue and net profit increased "against the trend". What did vatti do right?

Record: how to solve the problem of "the system cannot find the specified path" in the picture message uploaded by transferto() of multipartfile class [valid through personal test]
![[pytorch] kaggle large image dataset data analysis + visualization](/img/b0/7b8aff44d6bedd7ca2c705f13a8556.jpg)
[pytorch] kaggle large image dataset data analysis + visualization

ROS learning-8 pit for custom action programming

STM32F103 IIC OLED program migration complete engineering code

Luzhengyao, who has entered the prefabricated vegetable track, still needs to stop being impatient

ROS learning -5 how function packs with the same name work (workspace coverage)

Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation
![[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port](/img/82/ed215078da0325b3adf95dcd6ffe30.jpg)
[the third day of actual combat of smart lock project based on stm32f401ret6 in 10 days] communication foundation and understanding serial port
随机推荐
Record: how to solve the problem of "the system cannot find the specified path" in the picture message uploaded by transferto() of multipartfile class [valid through personal test]
STM32 timer interrupt learning notes
1、 Set up Django automation platform (realize one click SQL execution)
Differences between constants and variables (detailed description) (learning note 3 -- variables and constants)
Swiper horizontal rotation grid
Paper reading - beat tracking by dynamic programming
Introduction to arm Cortex-M learning
分享三个关于CMDB的小故事
Luzhengyao, who has entered the prefabricated vegetable track, still needs to stop being impatient
Ruixing coffee 2022, extricating itself from difficulties and ushering in a smooth path
Application and routine of C language typedef struct
Sensorless / inductive manufacturing of brushless motor drive board based on stm32
Basic exercise of test questions Yanghui triangle (two-dimensional array and shallow copy)
Sqlserver2008 denied select permission on object'***** '(database'*****', schema'dbo')
Yovo3 and yovo3 tiny structure diagram
Sensor: MQ-5 gas module measures the gas value (code attached at the bottom)
[work notes] the problem of high leakage current in standby mode of dw7888 motor driver chip
华为设备配置CE双归属
蓝牙模块:使用问题集锦
Huawei equipment is configured with IP and virtual private network hybrid FRR