matplotlib.pyplot.ioff() in Python (original) (raw)
Last Updated : 22 Apr, 2020
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.ioff() Function:
The ioff() function in pyplot module of matplotlib library is used to turn the interactive mode off.
Syntax: matplotlib.pyplot.ioff()
Parameters: This method does not accepts any parameter.
Returns: This method does not return any value.
Below examples illustrate the matplotlib.pyplot.ioff() function in matplotlib.pyplot:
Example #1:
import
matplotlib.pyplot as plt
import
numpy as np
plt.ioff()
plt.plot([
1.4
,
2.5
,
0.3
])
axes
=
plt.gca()
axes.plot([
3.1
,
2.2
,
6
])
plt.title(
'matplotlib.pyplot.ioff() function Example'
,
`` fontweight
=
"bold"
)
plt.show()
Output:
Example #2:
import
matplotlib.pyplot as plt
import
numpy as np
plt.ioff()
random_array
=
np.arange(
-
2
,
4
)
line_1
=
random_array
*
2
line_2
=
10
/
(random_array
*
2
+
1
)
figure, axes
=
plt.subplots()
axes.plot(random_array, line_1,
`` 'ro-'
, random_array,
`` line_2,
'bo-'
,
`` linestyle
=
'solid'
)
axes.fill_between(random_array,
`` line_1,
`` line_2,
`` where
=
line_2>line_1,
`` interpolate
=
True
,
`` color
=
'green'
, alpha
=
0.4
)
lgnd
=
axes.legend([
'line-1'
,
`` 'line-2'
],
`` loc
=
'lower center'
,
`` shadow
=
True
)
lgnd.get_frame().set_facecolor(
'# ffb19a'
)
plt.title(
'matplotlib.pyplot.ioff() function Example'
,
`` fontweight
=
"bold"
)
plt.show()
Output:
Similar Reads
- Matplotlib.pyplot.ion() in Python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. The matplotlib.pyplot.ion() is used to turn on interactive mode. To check the status of 4 min read
- Matplotlib.pyplot.gci() 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, 2 min read
- Matplotlib.pyplot.ginput() 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, 2 min read
- Matplotlib.pyplot.grid() 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.grid() Function The grid() function in pyplot module of matplotlib library is used to c 2 min read
- 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.bone() 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, 2 min read
- Matplotlib.pyplot.clim() 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, 2 min read
- Matplotlib.pyplot.hlines() in Python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. Matplotlib.pyplot.hlines() The Matplotlib.pyplot.hlines() is used to draw horizontal lin 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.findobj() in Python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.pyplot.findobj() This function is used to recursively find all instances of a 2 min read