Matplotlib Pyplot API
Below is a new untitled notebook with the .ipynb extension (representing an IPython notebook) displayed in a new tab in the browser.
matplotlib.pyplot is a collection of command-style functions that make Matplotlib work like MATLAB. Each Pyplot function will make some changes to the graph. For example, the function creates a graph, a plotting area within a graph, draws some lines within the plotting area, decorates the graph with labels, etc.
Draw (chart) type
Number | Function | Description |
1 | Bar | Draw a bar chart (bar graph). |
2 | Barh | Draw a horizontal bar chart. |
3 | Boxplot | Draw a boxplot and whisker plot. |
4 | Hist | Draw a histogram. |
5 | hist2d | Draw2D histogram. |
6 | Pie | Draw a pie chart. |
7 | Plot | Draw the lines and/Or mark. |
8 | Polar | Draw a polar coordinate plot. |
9 | Scatter | Draw a scatter plot of x and y. |
10 | Stackplot | Draw a stacked area plot. |
11 | Stem | Draw a stem plot |
12 | Step | Draw a step plot. |
13 | Quiver | Draw a two-dimensional arrow field. |
Image functions
Number | Function | Description |
1 | Imread | Read images from files into arrays. |
2 | Imsave | Save arrays like in image files. |
3 | Imshow | Display images on the axis. |
Axis Functions
Number | Function | Description |
1 | Axes | Add Axis to the Figure. |
2 | Text | Add Text to the Axis. |
3 | Title | Set the Title of the Current Axis. |
4 | Xlabel | Set the X-axis Label of the Current Axis. |
5 | Xlim | Get or Set the X Limit of the Current Axis. |
6 | Xscale | Set the X-axis Scaling. |
7 | Xticks | Get or Set the X Limit of the Current Tick Position and Label. |
8 | Ylabel | Set the Y-axis Label of the Current Axis. |
9 | Ylim | Get or Set the Y Limit of the Current Axis. |
10 | Yscale | Set the Y-axis Scaling. |
11 | Yticks | Get or Set the Y Limit of the Current Tick Position and Label. |
Graphical Function
Number | Function | Description |
1 | Figtext | Add Text to the Figure. |
2 | Figure | Create a New Figure. |
3 | Show | Display a Figure. |
4 | Savefig | Save Current Figure. |
5 | Close | Close a Figure Window. |