Home >Backend Development >Python Tutorial >Which python drawing software is
Matplotlib is a Python 2D plotting library that produces publication-quality graphics in a variety of hardcopy formats and in a cross-platform interactive environment. With Matplotlib, developers can generate plots with just a few lines of code. Generally, line charts, scatter charts, bar charts, pie charts, histograms, subgraphs, etc. can be drawn. Matplot uses Numpy for array operations and calls a series of other Python libraries for hardware interaction.
Pylab is an interface to the matplotlib object-oriented drawing library. Its syntax is very similar to matlab. In other words, its main drawing commands have similar parameters to the corresponding commands in matlab.
Basic drawing
Introduction to drawing
Using the matplotlib library to draw, the principle is very simple, as follows 5 steps:
Create a drawing (figure)
Create one or more plotting areas (coordinate systems/axes, axes) on the drawing
Draw points, lines, etc. on the plotting area
Add modified labels for plotting (on the drawing line or on the coordinate axis)
Other DIY
Related recommendations: "python video tutorial"
In the above process, there are mainly the following three elements:
Variables
Function
Drawings (figure) and coordinate axes (axes)
Among them, variables and functions describe the figure and the elements together by changing the elements in the figure and axes (for example: title, label, points and lines, etc.) axes, that is, drawing on the canvas. The picture structure is as follows:
As shown in the picture above, there are coordinate axes (axes) in a drawing (figure), title is the image title, and axis is the coordinate axes. label is the coordinate axis label, tick is the tick mark, and tick label is the tick annotation.
The above is the detailed content of Which python drawing software is. For more information, please follow other related articles on the PHP Chinese website!