Matplotlib.axes.Axes.set_frame_on() in Python Last Updated : 19 Apr, 2020 Comments Improve Suggest changes Like Article Like Report Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.set_frame_on() Function The Axes.set_frame_on() function in axes module of matplotlib library is used to set whether the axes rectangle patch is drawn or not. Syntax: Axes.set_axis_on(self) Parameters: This method accept only one parameters. b: This parameter contains a boolean value and it is used for drawing the axes rectangle patch. Returns:This method does not returns anything. Note: If True is used, it does not effect any thing. Below examples illustrate the matplotlib.axes.Axes.set_frame_on() function in matplotlib.axes: Example 1: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt x = np.arange(-5, 5, 0.01) y1 = -3 * x*x + 10 * x + 10 y2 = 3 * x*x + x fig, ax = plt.subplots() ax.plot(x, y1, x, y2, color ='black') ax.fill_between(x, y1, y2, where = y2 >y1, facecolor ='green', alpha = 0.8) ax.fill_between(x, y1, y2, where = y2 <= y1, facecolor ='black', alpha = 0.8) ax.set_frame_on(False) ax.set_title('matplotlib.axes.Axes.set_frame_on() Example') plt.show() Output: Example 2: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt x = np.arange(16) y = np.sin(x / 3) fig, ax = plt.subplots() ax.step(x, y + 2, label ='pre (default)') ax.plot(x, y + 2, 'o--', color ='black', alpha = 0.3) ax.step(x, y + 1, where ='mid', label ='mid') ax.plot(x, y + 1, 'o--', color ='black', alpha = 0.3) ax.step(x, y, where ='post', label ='post') ax.plot(x, y, 'o--', color ='black', alpha = 0.3) ax.grid(axis ='x', color ='0.95') ax.legend(title ='Parameter where:') ax.set_frame_on(False) ax.set_title('matplotlib.axes.Axes.set_frame_on() Example') plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.axes.Axes.set_frame_on() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.axes.Axes.set_axis_on() in Python Axes.set_axis_on() function in Matplotlib is used to turn on the axis lines, ticks, tick labels, and axis labels on a given Axes object. It is a simple way to make the axis visible if it was previously turned off. It's key features include:Turns on the axis lines, ticks, tick labels and axis labels. 2 min read Matplotlib.axes.Axes.get_frame_on() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.set_figure() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.set_fc() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 1 min read Matplotlib.axes.Axes.set_clip_on() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Like