当前位置:网站首页>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 second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] GPIO and register
- Gome's ambition of "folding up" app
- Bluetooth module: use problem collection
- 记录:如何解决MultipartFile类的transferTo()上传图片报“系统找不到指定的路径“问题【亲测有效】
- [pytorch]fixmatch code explanation (super detailed)
- 华为设备配置双反射器优化虚拟专用网骨干层
- Vivo released originos ocean, and the domestic customized system is getting better and better
- Share three stories about CMDB
- QT realizes mind mapping function (II)
- [learning notes] xr872 GUI littlevgl 8.0 migration (file system)
猜你喜欢
![[the fourth day of actual combat of stm32f401ret6 smart lock project in 10 days] voice control is realized by externally interrupted keys](/img/fc/f03c7dc4d5ee12aaa301f54e4cd3f4.jpg)
[the fourth day of actual combat of stm32f401ret6 smart lock project in 10 days] voice control is realized by externally interrupted keys

Understand speech denoising

Ruixing coffee moves towards "national consumption"

Understand HMM

Solution of depth learning for 3D anisotropic images

Introduction to armv8/armv9 - learning this article is enough

Vivo released originos ocean, and the domestic customized system is getting better and better

Think about the possibility of attacking secure memory through mmu/tlb/cache

Stm32 mpu6050 servo pan tilt support follow

Why is Huawei matebook x Pro 2022 leading a "laptop" revolution
随机推荐
Barrykay electronics rushes to the scientific innovation board: it is planned to raise 360million yuan. Mr. and Mrs. Wang Binhua are the major shareholders
The new wild prospect of JD instant retailing from the perspective of "hour shopping"
[unity] problems encountered in packaging webgl project and their solutions
[arithmetic, relation, logic, bit, compound assignment, self increasing, self decreasing and other] operators (learning note 4 -- C language operators)
Répertoire d'exclusion du transport rsync
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
Chapter7-10_ Deep Learning for Question Answering (1/2)
In the third quarter, the revenue and net profit increased "against the trend". What did vatti do right?
ROS learning-7 error in custom message or service reference header file
Day 1 of the 10 day smart lock project (understand the SCM stm32f401ret6 and C language foundation)
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]
[learning notes] xr872 GUI littlevgl 8.0 migration (display part)
STM32F103 IIC OLED program migration complete engineering code
Differences between constants and variables (detailed description) (learning note 3 -- variables and constants)
[single chip microcomputer] single timer in front and back platform program framework to realize multi delay tasks
Uniapp preview function
[keras] generator for 3D u-net source code analysis py
uniapp 预览功能
Share three stories about CMDB
[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] (lighting with library function and register respectively)