Matplotlib.pyplot.axes() in Python (original) (raw)
Last Updated : 17 May, 2020
Pyplot is another module of matplotlib that enables users to integrate MATLAB within Python environment, and thus providing MATLAB like interface and making Python visually interactive.
Matplotlib.pyplot.axes()
pyplot.axes
is a function of the matplotlib library that adds axes to the current graph and makes it as current axes. Its output depends on the arguments used.
Syntax: matplotlib.pyplot.axes(*args, **kwargs)
Parameters:
*args: It may include either None(nothing) or 4 tuples of float type
- none: It gives a new full window axes
- 4 tuples: It takes 4 tuples as list i.e [left bottom width height] and gives a window of these dimensions as axes.
**kwargs: There are several keyword arguments(kwargs) used as parameters to pyplot.axes(), most common include facecolor, gid, in_layout, label, position, xlim, ylim, etc.
Example 1:
import
matplotlib.pyplot as plt
x
=
[
8
,
5
,
11
,
13
,
16
,
23
]
y
=
[
14
,
8
,
21
,
7
,
12
,
15
]
plt.plot(x, y)
plt.axes()
Output:
Example 2:
import
matplotlib.pyplot as plt
x
=
[
8
,
5
,
11
,
13
,
16
,
23
]
y
=
[
14
,
8
,
21
,
7
,
12
,
15
]
plt.axes([
0
,
2.0
,
2.0
,
2.0
], facecolor
=
'black'
)
Output:
Similar Reads
- Matplotlib.pyplot.axis() in Python Matplotlib is a plotting library for creating static, animated, and interactive visualizations in Python. Pyplot is a Matplotlib module which provides a MATLAB-like interface. Matplotlib is designed to be as usable as MATLAB, with the ability to use Python and the advantage of being free and open-so 1 min read
- Matplotlib.pyplot.delaxes() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.delaxes() Function The delaxes() function in pyplot module of matplotlib library is use 2 min read
- Matplotlib.pyplot.axvspan() in Python Matplotlib is a plotting library for creating static, animated, and interactive visualizations in Python.\ Pyplot is a Matplotlib module which provides a MATLAB-like interface. Matplotlib is designed to be as usable as MATLAB, with the ability to use Python and the advantage of being free and open-s 2 min read
- Matplotlib.pyplot.axhspan() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.axhspan() Function The axhspan() function in pyplot module of matplotlib library is use 2 min read
- Matplotlib.pyplot.axvline() in Python Matplotlib is a plotting library for creating static, animated, and interactive visualizations in Python. Matplotlib can be used in Python scripts, the Python and IPython shell, web application servers, and various graphical user interface toolkits like Tkinter, awxPython, etc. Note: For more inform 2 min read
- matplotlib.pyplot.axhline() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.axhline() Function The axhline() function in pyplot module of matplotlib library is use 2 min read
- Matplotlib.pyplot.gca() in Python Matplotlib is a library in Python and it is a numerical - mathematical extension for the NumPy library. Pyplot is a state-based interface to a Matplotlib module that provides a MATLAB-like interface.  matplotlib.pyplot.gca() Function The gca() function in pyplot module of matplotlib library is used 2 min read
- Matplotlib.pyplot.cla() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 1 min read
- Matplotlib.pyplot.draw() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.draw() Function The draw() function in pyplot module of matplotlib library is used to r 1 min read
- Matplotlib.axes.Axes.plot() in Python Axes.plot() method in Matplotlib is used to plot data on a set of axes. It is primarily used for creating line plots but can be extended for other types of plots, including scatter plots, bar plots, and more. When using this function, you typically provide the x and y coordinates of the data points 3 min read