`); Plot typesUser guideTutorialsExamplesReferenceContributeReleases GitterGitter DiscourseDiscourse GitHubGitHub TwitterTwitterPlot typesUser guideTutorialsExamplesReferenceContributeReleases GitterGitter DiscourseDiscourse GitHubGitHub TwitterTwitterSection Navigationmatplotlib.axes.Axesmatplotlib.axes.Axes.viewLimmatplotlib.axes.Axes.dataLimmatplotlib.axes.Axes.spinesmatplotlib.axes.Axes.plotmatplotlib.axes.Axes.errorbarmatplotlib.axes..." />`); Plot typesUser guideTutorialsExamplesReferenceContributeReleases GitterGitter DiscourseDiscourse GitHubGitHub TwitterTwitterPlot typesUser guideTutorialsExamplesReferenceContributeReleases GitterGitter DiscourseDiscourse GitHubGitHub TwitterTwitterSection Navigationmatplotlib.axes.Axesmatplotlib.axes.Axes.viewLimmatplotlib.axes.Axes.dataLimmatplotlib.axes.Axes.spinesmatplotlib.axes.Axes.plotmatplotlib.axes.Axes.errorbarmatplotlib.axes..." /> matplotlib.axes.Axes.clear — Matplotlib 3.10.3 documentation
Skip to main content
Matplotlib 3.10.3 documentation - Home
  • Plot types
  • User guide
  • Tutorials
  • Examples
  • Reference
  • Contribute
  • Releases
  • Gitter
  • Discourse
  • GitHub
  • Twitter
  • Plot types
  • User guide
  • Tutorials
  • Examples
  • Reference
  • Contribute
  • Releases
  • Gitter
  • Discourse
  • GitHub
  • Twitter

Section Navigation

  • matplotlib.axes.Axes
  • matplotlib.axes.Axes.viewLim
  • matplotlib.axes.Axes.dataLim
  • matplotlib.axes.Axes.spines
  • matplotlib.axes.Axes.plot
  • matplotlib.axes.Axes.errorbar
  • matplotlib.axes.Axes.scatter
  • matplotlib.axes.Axes.plot_date
  • matplotlib.axes.Axes.step
  • matplotlib.axes.Axes.loglog
  • matplotlib.axes.Axes.semilogx
  • matplotlib.axes.Axes.semilogy
  • matplotlib.axes.Axes.fill_between
  • matplotlib.axes.Axes.fill_betweenx
  • matplotlib.axes.Axes.bar
  • matplotlib.axes.Axes.barh
  • matplotlib.axes.Axes.bar_label
  • matplotlib.axes.Axes.stem
  • matplotlib.axes.Axes.eventplot
  • matplotlib.axes.Axes.pie
  • matplotlib.axes.Axes.stackplot
  • matplotlib.axes.Axes.broken_barh
  • matplotlib.axes.Axes.vlines
  • matplotlib.axes.Axes.hlines
  • matplotlib.axes.Axes.fill
  • matplotlib.axes.Axes.axhline
  • matplotlib.axes.Axes.axhspan
  • matplotlib.axes.Axes.axvline
  • matplotlib.axes.Axes.axvspan
  • matplotlib.axes.Axes.axline
  • matplotlib.axes.Axes.acorr
  • matplotlib.axes.Axes.angle_spectrum
  • matplotlib.axes.Axes.cohere
  • matplotlib.axes.Axes.csd
  • matplotlib.axes.Axes.magnitude_spectrum
  • matplotlib.axes.Axes.phase_spectrum
  • matplotlib.axes.Axes.psd
  • matplotlib.axes.Axes.specgram
  • matplotlib.axes.Axes.xcorr
  • matplotlib.axes.Axes.ecdf
  • matplotlib.axes.Axes.boxplot
  • matplotlib.axes.Axes.violinplot
  • matplotlib.axes.Axes.bxp
  • matplotlib.axes.Axes.violin
  • matplotlib.axes.Axes.hexbin
  • matplotlib.axes.Axes.hist
  • matplotlib.axes.Axes.hist2d
  • matplotlib.axes.Axes.stairs
  • matplotlib.axes.Axes.clabel
  • matplotlib.axes.Axes.contour
  • matplotlib.axes.Axes.contourf
  • matplotlib.axes.Axes.imshow
  • matplotlib.axes.Axes.matshow
  • matplotlib.axes.Axes.pcolor
  • matplotlib.axes.Axes.pcolorfast
  • matplotlib.axes.Axes.pcolormesh
  • matplotlib.axes.Axes.spy
  • matplotlib.axes.Axes.tripcolor
  • matplotlib.axes.Axes.triplot
  • matplotlib.axes.Axes.tricontour
  • matplotlib.axes.Axes.tricontourf
  • matplotlib.axes.Axes.annotate
  • matplotlib.axes.Axes.text
  • matplotlib.axes.Axes.table
  • matplotlib.axes.Axes.arrow
  • matplotlib.axes.Axes.inset_axes
  • matplotlib.axes.Axes.indicate_inset
  • matplotlib.axes.Axes.indicate_inset_zoom
  • matplotlib.axes.Axes.secondary_xaxis
  • matplotlib.axes.Axes.secondary_yaxis
  • matplotlib.axes.Axes.barbs
  • matplotlib.axes.Axes.quiver
  • matplotlib.axes.Axes.quiverkey
  • matplotlib.axes.Axes.streamplot
  • matplotlib.axes.Axes.cla
  • matplotlib.axes.Axes.clear
  • matplotlib.axes.Axes.axis
  • matplotlib.axes.Axes.set_axis_off
  • matplotlib.axes.Axes.set_axis_on
  • matplotlib.axes.Axes.set_frame_on
  • matplotlib.axes.Axes.get_frame_on
  • matplotlib.axes.Axes.set_axisbelow
  • matplotlib.axes.Axes.get_axisbelow
  • matplotlib.axes.Axes.grid
  • matplotlib.axes.Axes.get_facecolor
  • matplotlib.axes.Axes.set_facecolor
  • matplotlib.axes.Axes.set_prop_cycle
  • matplotlib.axes.Axes.xaxis
  • matplotlib.axes.Axes.yaxis
  • matplotlib.axes.Axes.get_xaxis
  • matplotlib.axes.Axes.get_yaxis
  • matplotlib.axes.Axes.invert_xaxis
  • matplotlib.axes.Axes.xaxis_inverted
  • matplotlib.axes.Axes.invert_yaxis
  • matplotlib.axes.Axes.yaxis_inverted
  • matplotlib.axes.Axes.set_xlim
  • matplotlib.axes.Axes.get_xlim
  • matplotlib.axes.Axes.set_ylim
  • matplotlib.axes.Axes.get_ylim
  • matplotlib.axes.Axes.update_datalim
  • matplotlib.axes.Axes.set_xbound
  • matplotlib.axes.Axes.get_xbound
  • matplotlib.axes.Axes.set_ybound
  • matplotlib.axes.Axes.get_ybound
  • matplotlib.axes.Axes.set_xlabel
  • matplotlib.axes.Axes.get_xlabel
  • matplotlib.axes.Axes.set_ylabel
  • matplotlib.axes.Axes.get_ylabel
  • matplotlib.axes.Axes.label_outer
  • matplotlib.axes.Axes.set_title
  • matplotlib.axes.Axes.get_title
  • matplotlib.axes.Axes.legend
  • matplotlib.axes.Axes.get_legend
  • matplotlib.axes.Axes.get_legend_handles_labels
  • matplotlib.axes.Axes.set_xscale
  • matplotlib.axes.Axes.get_xscale
  • matplotlib.axes.Axes.set_yscale
  • matplotlib.axes.Axes.get_yscale
  • matplotlib.axes.Axes.use_sticky_edges
  • matplotlib.axes.Axes.margins
  • matplotlib.axes.Axes.get_xmargin
  • matplotlib.axes.Axes.get_ymargin
  • matplotlib.axes.Axes.set_xmargin
  • matplotlib.axes.Axes.set_ymargin
  • matplotlib.axes.Axes.relim
  • matplotlib.axes.Axes.autoscale
  • matplotlib.axes.Axes.autoscale_view
  • matplotlib.axes.Axes.set_autoscale_on
  • matplotlib.axes.Axes.get_autoscale_on
  • matplotlib.axes.Axes.set_autoscalex_on
  • matplotlib.axes.Axes.get_autoscalex_on
  • matplotlib.axes.Axes.set_autoscaley_on
  • matplotlib.axes.Axes.get_autoscaley_on
  • matplotlib.axes.Axes.apply_aspect
  • matplotlib.axes.Axes.set_aspect
  • matplotlib.axes.Axes.get_aspect
  • matplotlib.axes.Axes.set_box_aspect
  • matplotlib.axes.Axes.get_box_aspect
  • matplotlib.axes.Axes.set_adjustable
  • matplotlib.axes.Axes.get_adjustable
  • matplotlib.axes.Axes.set_xticks
  • matplotlib.axes.Axes.get_xticks
  • matplotlib.axes.Axes.set_xticklabels
  • matplotlib.axes.Axes.get_xticklabels
  • matplotlib.axes.Axes.get_xmajorticklabels
  • matplotlib.axes.Axes.get_xminorticklabels
  • matplotlib.axes.Axes.get_xgridlines
  • matplotlib.axes.Axes.get_xticklines
  • matplotlib.axes.Axes.xaxis_date
  • matplotlib.axes.Axes.set_yticks
  • matplotlib.axes.Axes.get_yticks
  • matplotlib.axes.Axes.set_yticklabels
  • matplotlib.axes.Axes.get_yticklabels
  • matplotlib.axes.Axes.get_ymajorticklabels
  • matplotlib.axes.Axes.get_yminorticklabels
  • matplotlib.axes.Axes.get_ygridlines
  • matplotlib.axes.Axes.get_yticklines
  • matplotlib.axes.Axes.yaxis_date
  • matplotlib.axes.Axes.minorticks_off
  • matplotlib.axes.Axes.minorticks_on
  • matplotlib.axes.Axes.ticklabel_format
  • matplotlib.axes.Axes.tick_params
  • matplotlib.axes.Axes.locator_params
  • matplotlib.axes.Axes.convert_xunits
  • matplotlib.axes.Axes.convert_yunits
  • matplotlib.axes.Axes.have_units
  • matplotlib.axes.Axes.add_artist
  • matplotlib.axes.Axes.add_child_axes
  • matplotlib.axes.Axes.add_collection
  • matplotlib.axes.Axes.add_container
  • matplotlib.axes.Axes.add_image
  • matplotlib.axes.Axes.add_line
  • matplotlib.axes.Axes.add_patch
  • matplotlib.axes.Axes.add_table
  • matplotlib.axes.Axes.twinx
  • matplotlib.axes.Axes.twiny
  • matplotlib.axes.Axes.sharex
  • matplotlib.axes.Axes.sharey
  • matplotlib.axes.Axes.get_shared_x_axes
  • matplotlib.axes.Axes.get_shared_y_axes
  • matplotlib.axes.Axes.get_anchor
  • matplotlib.axes.Axes.set_anchor
  • matplotlib.axes.Axes.get_axes_locator
  • matplotlib.axes.Axes.set_axes_locator
  • matplotlib.axes.Axes.get_subplotspec
  • matplotlib.axes.Axes.set_subplotspec
  • matplotlib.axes.Axes.reset_position
  • matplotlib.axes.Axes.get_position
  • matplotlib.axes.Axes.set_position
  • matplotlib.axes.Axes.stale
  • matplotlib.axes.Axes.pchanged
  • matplotlib.axes.Axes.add_callback
  • matplotlib.axes.Axes.remove_callback
  • matplotlib.axes.Axes.can_pan
  • matplotlib.axes.Axes.can_zoom
  • matplotlib.axes.Axes.get_navigate
  • matplotlib.axes.Axes.set_navigate
  • matplotlib.axes.Axes.get_navigate_mode
  • matplotlib.axes.Axes.set_navigate_mode
  • matplotlib.axes.Axes.get_forward_navigation_events
  • matplotlib.axes.Axes.set_forward_navigation_events
  • matplotlib.axes.Axes.start_pan
  • matplotlib.axes.Axes.drag_pan
  • matplotlib.axes.Axes.end_pan
  • matplotlib.axes.Axes.format_coord
  • matplotlib.axes.Axes.format_cursor_data
  • matplotlib.axes.Axes.format_xdata
  • matplotlib.axes.Axes.format_ydata
  • matplotlib.axes.Axes.mouseover
  • matplotlib.axes.Axes.in_axes
  • matplotlib.axes.Axes.contains
  • matplotlib.axes.Axes.contains_point
  • matplotlib.axes.Axes.get_cursor_data
  • matplotlib.axes.Axes.get_children
  • matplotlib.axes.Axes.get_images
  • matplotlib.axes.Axes.get_lines
  • matplotlib.axes.Axes.findobj
  • matplotlib.axes.Axes.draw
  • matplotlib.axes.Axes.draw_artist
  • matplotlib.axes.Axes.redraw_in_frame
  • matplotlib.axes.Axes.get_rasterization_zorder
  • matplotlib.axes.Axes.set_rasterization_zorder
  • matplotlib.axes.Axes.get_window_extent
  • matplotlib.axes.Axes.get_tightbbox
  • matplotlib.axes.Axes.name
  • matplotlib.axes.Axes.get_xaxis_transform
  • matplotlib.axes.Axes.get_yaxis_transform
  • matplotlib.axes.Axes.get_data_ratio
  • matplotlib.axes.Axes.get_xaxis_text1_transform
  • matplotlib.axes.Axes.get_xaxis_text2_transform
  • matplotlib.axes.Axes.get_yaxis_text1_transform
  • matplotlib.axes.Axes.get_yaxis_text2_transform
  • matplotlib.axes.Axes.zorder
  • matplotlib.axes.Axes.get_default_bbox_extra_artists
  • matplotlib.axes.Axes.get_transformed_clip_path_and_affine
  • matplotlib.axes.Axes.has_data
  • matplotlib.axes.Axes.set
  • matplotlib.axes.Axes.remove
  • API Reference
  • matplotlib.axes
  • matplotlib.a...

matplotlib.axes.Axes.clear#

Axes.clear()[source]#

Clear the Axes.

Examples using matplotlib.axes.Axes.clear#

pyplot animation

pyplot animation

Data browser

Data browser
On this page
  • Axes.clear()
  • Examples using matplotlib.axes.Axes.clear

© Copyright 2002–2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012–2025 The Matplotlib development team.

Created using Sphinx 8.2.3.

Built from v3.10.3-2-g3b85ba4365.

Built with the PyData Sphinx Theme 0.15.4.