Answers for LLM inference engineers

AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap' (or 'FigureCanvasAgg' object has no attribute 'tostring_rgb', 'seaborn' is not a valid package style, any name): which matplotlib removed it and what to use

matplotlib 3.11.0 (2026-06-12) removed matplotlib.cm.get_cmap: use matplotlib.colormaps[name] or plt.get_cmap(name) (3.9.0 had removed it too; 3.9.2 put it back). 3.10.0 removed FigureCanvasAgg.tostring_rgb: use np.asarray(fig.canvas.buffer_rgba()). 3.8.0 dropped the 'seaborn-*' style names: use 'seaborn-v0_8-*'. 3.9.0 removed cm.register_cmap and Legend.legendHandles (legend_handles). If the error comes from a library you did not write, upgrade the library or pin matplotlib below the release that removed the name. Paste the error below for the release-by-release answer.

Published 2026-11-25 · 48 matplotlib releases installed and run, 3.1.2 to 3.11.2 (155,760 lookups) · how

Examples:

Runs in your browser on the data in this page (matplotlib_names.json); nothing you paste is sent anywhere.

Which release removed it, and what replaces it?

226 names that one matplotlib release has and a later one does not (17 of them in 3.9.0, 16 of them style names). "Instead" is matplotlib's own deprecation text from the last release that had the name (208 of 210 names), except where marked; for a style, the new name that works in 3.11.2.

NameRemoved inInstead
matplotlib.axes.Axes.mouseover_set3.2.0mouseover_set was deprecated in Matplotlib 3.0.
matplotlib.cbook.Bunch3.2.0Bunch was deprecated in Matplotlib 3.0. Use types.SimpleNamespace instead.
matplotlib.cbook.GetRealpathAndStat3.2.0GetRealpathAndStat was deprecated in Matplotlib 3.0.
matplotlib.cbook.is_numlike3.2.0is_numlike was deprecated in Matplotlib 3.0. Use isinstance(..., numbers.Number) instead.
matplotlib.cbook.listFiles3.2.0listFiles was deprecated in Matplotlib 3.0.
matplotlib.cbook.Locked3.2.0Locked was deprecated in Matplotlib 3.0.
matplotlib.cbook.mkdirs3.2.0mkdirs was deprecated in Matplotlib 3.0.
matplotlib.cbook.unicode_safe3.2.0unicode_safe was deprecated in Matplotlib 3.0.
matplotlib.font_manager.TempCache3.2.0TempCache was deprecated in Matplotlib 3.0.
matplotlib.legend.is_hashable3.2.0is_hashable was deprecated in Matplotlib 3.1. Use isinstance(..., collections.abc.Hashable) instead.
matplotlib.patches.YAArrow3.2.0YAArrow was deprecated in Matplotlib 3.0. Use FancyArrowPatch instead.
matplotlib.pyplot.pylab_setup3.2.0pylab_setup was deprecated in Matplotlib 3.0.
matplotlib.ticker.Base3.2.0Base was deprecated in Matplotlib 3.0.
matplotlib.ticker.closeto3.2.0closeto was deprecated in Matplotlib 3.0.
matplotlib.ticker.nearest_long3.2.0`nearest_long` was deprecated in Matplotlib 3.0. Use `round` instead.
mpl_toolkits.axes_grid1.LocatableAxes3.2.0LocatableAxes was deprecated in Matplotlib 3.0. Use mpl_toolkits.axes_grid1.mpl_axes.Axes instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.mouseover_set3.2.0mouseover_set was deprecated in Matplotlib 3.0.
matplotlib.checkdep_dvipng3.3.0checkdep_dvipng was deprecated in Matplotlib 3.1.
matplotlib.checkdep_ghostscript3.3.0checkdep_ghostscript was deprecated in Matplotlib 3.1.
matplotlib.checkdep_inkscape3.3.0checkdep_inkscape was deprecated in Matplotlib 3.1.
matplotlib.checkdep_pdftops3.3.0checkdep_pdftops was deprecated in Matplotlib 3.1.
matplotlib.dedent3.3.0dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead.
matplotlib.get_label3.3.0get_label was deprecated in Matplotlib 3.1.
matplotlib.get_py2exe_datafiles3.3.0get_py2exe_datafiles was deprecated in Matplotlib 3.1.
matplotlib.tk_window_focus3.3.0tk_window_focus was deprecated in Matplotlib 3.1. Use rcParams['tk.window_focus'] instead.
matplotlib.axes.Axes.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.cbook.dedent3.3.0dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead.
matplotlib.cbook.get_label3.3.0get_label was deprecated in Matplotlib 3.1.
matplotlib.cbook.is_hashable3.3.0is_hashable was deprecated in Matplotlib 3.1. Use isinstance(..., collections.abc.Hashable) instead.
matplotlib.cbook.iterable3.3.0iterable was deprecated in Matplotlib 3.1. Use np.iterable instead.
matplotlib.cbook.safezip3.3.0safezip was deprecated in Matplotlib 3.1.
matplotlib.colorbar.Colorbar.get_clim3.3.0get_clim was deprecated in Matplotlib 3.1. Use ScalarMappable.get_clim instead.
matplotlib.colorbar.Colorbar.get_cmap3.3.0get_cmap was deprecated in Matplotlib 3.1. Use ScalarMappable.get_cmap instead.
matplotlib.colorbar.Colorbar.set_clim3.3.0set_clim was deprecated in Matplotlib 3.1. Use ScalarMappable.set_clim instead.
matplotlib.colorbar.Colorbar.set_cmap3.3.0set_cmap was deprecated in Matplotlib 3.1. Use ScalarMappable.set_cmap instead.
matplotlib.colorbar.Colorbar.set_norm3.3.0set_norm was deprecated in Matplotlib 3.1. Use ScalarMappable.set_norm instead.
matplotlib.dates.bytespdate2num3.3.0bytespdate2num was deprecated in Matplotlib 3.1. Use time.strptime or dateutil.parser.parse or datestr2num instead.
matplotlib.dates.hours3.3.0hours was deprecated in Matplotlib 3.1.
matplotlib.dates.minutes3.3.0minutes was deprecated in Matplotlib 3.1.
matplotlib.dates.seconds3.3.0seconds was deprecated in Matplotlib 3.1.
matplotlib.dates.strpdate2num3.3.0strpdate2num was deprecated in Matplotlib 3.1. Use time.strptime or dateutil.parser.parse or datestr2num instead.
matplotlib.dates.weeks3.3.0weeks was deprecated in Matplotlib 3.1.
matplotlib.figure.process_projection_requirements3.3.0process_projection_requirements was deprecated in Matplotlib 3.1.
matplotlib.figure.TextWithDash3.3.0TextWithDash was deprecated in Matplotlib 3.1. Use Annotation instead.
matplotlib.figure.Figure.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.font_manager.OSXInstalledFonts3.3.0OSXInstalledFonts was deprecated in Matplotlib 3.1.
matplotlib.legend.Legend.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.lines.Line2D.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.lines.Line2D.verticalOffset3.3.0verticalOffset was deprecated in Matplotlib 3.1.
matplotlib.mlab.demean3.3.0demean was deprecated in Matplotlib 3.1. Use detrend_mean instead.
matplotlib.path.get_paths_extents3.3.0get_paths_extents was deprecated in Matplotlib 3.1. Use get_paths_collection_extents instead.
matplotlib.pyplot.dedent3.3.0dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead.
matplotlib.pyplot.get_scale_docs3.3.0get_scale_docs() is considered private API since 3.1 and will be removed from the public API in 3.3.
matplotlib.pyplot.plotfile3.3.0plotfile was deprecated in Matplotlib 3.1.
matplotlib.rcsetup.validate_qt43.3.0validate_qt4 was deprecated in Matplotlib 3.1.
matplotlib.rcsetup.validate_qt53.3.0validate_qt5 was deprecated in Matplotlib 3.1.
matplotlib.rcsetup.validate_verbose3.3.0validate_verbose was deprecated in Matplotlib 3.1.
matplotlib.rcsetup.ValidateInterval3.3.0ValidateInterval was deprecated in Matplotlib 3.2.
matplotlib.text.TextWithDash3.3.0TextWithDash was deprecated in Matplotlib 3.1. Use Annotation instead.
matplotlib.text.Text.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.text.Text.is_math_text3.3.0is_math_text was deprecated in Matplotlib 3.1.
matplotlib.ticker.decade_down3.3.0decade_down was deprecated in Matplotlib 3.1.
matplotlib.ticker.decade_up3.3.0decade_up was deprecated in Matplotlib 3.1.
mpl_toolkits.mplot3d.axes3d.Axes3D.aname3.3.0aname was deprecated in Matplotlib 3.1.
matplotlib.checkdep_ps_distiller3.4.0checkdep_ps_distiller was deprecated in Matplotlib 3.2.
matplotlib.compare_versions3.4.0compare_versions was deprecated in Matplotlib 3.2.
matplotlib.get_home3.4.0get_home was deprecated in Matplotlib 3.2. Use os.path.expanduser('~') instead.
matplotlib.axes.Axes.get_data_ratio_log3.4.0get_data_ratio_log was deprecated in Matplotlib 3.2.
matplotlib.backends.backend_agg.FigureCanvasAgg.draw_cursor3.4.0draw_cursor was deprecated in Matplotlib 3.2.
matplotlib.cm.revcmap3.4.0revcmap was deprecated in Matplotlib 3.2. Use Colormap.reversed() instead.
matplotlib.colors.DivergingNorm3.4.0DivergingNorm was deprecated in Matplotlib 3.2. Use TwoSlopeNorm instead.
matplotlib.colors.makeMappingArray3.4.0makeMappingArray was deprecated in Matplotlib 3.2. This is not considered public API any longer.
matplotlib.dates.mx2num3.4.0mx2num was deprecated in Matplotlib 3.2.
matplotlib.figure.AxesStack3.4.0AxesStack was deprecated in Matplotlib 3.2.
matplotlib.figure.Figure.init_layoutbox3.4.0
matplotlib.font_manager.createFontList3.4.0createFontList was deprecated in Matplotlib 3.2. Use FontManager.addfont instead.
matplotlib.font_manager.JSONEncoder3.4.0JSONEncoder was deprecated in Matplotlib 3.2. Use json_dump instead.
matplotlib.mlab.apply_window3.4.0apply_window was deprecated in Matplotlib 3.2.
matplotlib.mlab.stride_repeat3.4.0stride_repeat was deprecated in Matplotlib 3.2.
matplotlib.rcsetup.update_savefig_format3.4.0update_savefig_format was deprecated in Matplotlib 3.2.
matplotlib.rcsetup.validate_animation_writer_path3.4.0validate_animation_writer_path was deprecated in Matplotlib 3.2.
matplotlib.rcsetup.validate_path_exists3.4.0validate_path_exists was deprecated in Matplotlib 3.2. Use os.path.exists instead.
mpl_toolkits.axes_grid1.colorbar3.4.0The mpl_toolkits.axes_grid1.colorbar module was deprecated in Matplotlib 3.2 and will be removed two minor releases later. Use matplotlib.colorbar instead.
mpl_toolkits.mplot3d.axes3d.unit_bbox3.4.0unit_bbox was deprecated in Matplotlib 3.2. Use Bbox.unit() instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.get_data_ratio_log3.4.0get_data_ratio_log was deprecated in Matplotlib 3.2.
matplotlib.compat3.5.0The matplotlib.compat module was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
matplotlib.ttconv3.5.0The matplotlib.ttconv module was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
matplotlib.animation.AVConvBase3.5.0AVConvBase was deprecated in Matplotlib 3.3.
matplotlib.axes.Axes.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
matplotlib.axes.Axes.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
matplotlib.axes.Axes.update_datalim_bounds3.5.0update_datalim_bounds was deprecated in Matplotlib 3.3. Use ax.dataLim.set(Bbox.union([ax.dataLim, bounds])) instead.
matplotlib.backend_bases.StatusbarBase3.5.0StatusbarBase was deprecated in Matplotlib 3.3.
matplotlib.cbook.get_realpath_and_stat3.5.0get_realpath_and_stat was deprecated in Matplotlib 3.3. Use os.path.realpath and os.stat instead.
matplotlib.cbook.IgnoredKeywordWarning3.5.0IgnoredKeywordWarning was deprecated in Matplotlib 3.3.
matplotlib.cbook.local_over_kwdict3.5.0local_over_kwdict was deprecated in Matplotlib 3.3. Use normalize_kwargs instead.
matplotlib.colorbar.Colorbar.config_axis3.5.0config_axis was deprecated in Matplotlib 3.3.
matplotlib.colorbar.Colorbar.on_mappable_changed3.5.0on_mappable_changed was deprecated in Matplotlib 3.3. Use update_normal instead.
matplotlib.colorbar.Colorbar.update_bruteforce3.5.0update_bruteforce was deprecated in Matplotlib 3.3. Use update_normal instead.
matplotlib.dates.IndexDateFormatter3.5.0IndexDateFormatter was deprecated in Matplotlib 3.3.
matplotlib.figure.Figure.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
matplotlib.figure.Figure.init_layoutgrid3.5.0
matplotlib.figure.Figure.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
matplotlib.legend.Legend.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
matplotlib.legend.Legend.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
matplotlib.lines.Line2D.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
matplotlib.lines.Line2D.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
matplotlib.rcsetup.validate_bool_maybe_none3.5.0validate_bool_maybe_none was deprecated in Matplotlib 3.3.
matplotlib.rcsetup.validate_hinting3.5.0validate_hinting was deprecated in Matplotlib 3.3.
matplotlib.rcsetup.validate_movie_writer3.5.0validate_movie_writer was deprecated in Matplotlib 3.3.
matplotlib.rcsetup.validate_nseq_float3.5.0validate_nseq_float was deprecated in Matplotlib 3.3.
matplotlib.rcsetup.validate_nseq_int3.5.0validate_nseq_int was deprecated in Matplotlib 3.3.
matplotlib.rcsetup.validate_webagg_address3.5.0validate_webagg_address was deprecated in Matplotlib 3.3.
matplotlib.text.Text.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
matplotlib.text.Text.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
matplotlib.ticker.IndexFormatter3.5.0IndexFormatter was deprecated in Matplotlib 3.3.
matplotlib.ticker.OldAutoLocator3.5.0OldAutoLocator was deprecated in Matplotlib 3.3.
matplotlib.ticker.OldScalarFormatter3.5.0OldScalarFormatter was deprecated in Matplotlib 3.3.
mpl_toolkits.mplot3d.axes3d.Axes3D.get_contains3.5.0get_contains was deprecated in Matplotlib 3.3. Use get_picker instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.set_contains3.5.0set_contains was deprecated in Matplotlib 3.3. Use set_picker instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.update_datalim_bounds3.5.0update_datalim_bounds was deprecated in Matplotlib 3.3. Use ax.dataLim.set(Bbox.union([ax.dataLim, bounds])) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.get_window_title3.6.0get_window_title was deprecated in Matplotlib 3.4. Use `.FigureManagerBase.get_window_title` or GUI-specific methods instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.set_window_title3.6.0set_window_title was deprecated in Matplotlib 3.4. Use `.FigureManagerBase.set_window_title` or GUI-specific methods instead.
matplotlib.cbook.deprecated3.6.0deprecated was deprecated in Matplotlib 3.4.
matplotlib.cbook.deprecation3.6.0The module matplotlib.cbook.deprecation is considered internal and it will be made private in the future.
matplotlib.cbook.warn_deprecated3.6.0warn_deprecated was deprecated in Matplotlib 3.4.
matplotlib.colorbar.colorbar_doc3.6.0colorbar_doc was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
matplotlib.colorbar.colorbar_factory3.6.0colorbar_factory was deprecated in Matplotlib 3.4. Use Colorbar instead.
matplotlib.colorbar.ColorbarPatch3.6.0ColorbarPatch was deprecated in Matplotlib 3.4. Use Colorbar instead.
matplotlib.colorbar.make_axes_kw_doc3.6.0make_axes_kw_doc was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
matplotlib.lines.Line2D.validCap3.6.0The validCap attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
matplotlib.lines.Line2D.validJoin3.6.0The validJoin attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
matplotlib.blocking_input3.7.0The matplotlib.blocking_input module was deprecated in Matplotlib 3.5 and will be removed two minor releases later.
matplotlib.is_url3.7.0is_url was deprecated in Matplotlib 3.5.
matplotlib.test3.7.0test was deprecated in Matplotlib 3.5. Use pytest instead.
matplotlib.URL_REGEX3.7.0URL_REGEX was deprecated in Matplotlib 3.5 and will be removed two minor releases later.
matplotlib.cbook.report_memory3.7.0report_memory was deprecated in Matplotlib 3.5. Use psutil.virtual_memory instead.
matplotlib.cm.LUTSIZE3.7.0LUTSIZE was deprecated in Matplotlib 3.5 and will be removed two minor releases later. Use rcParams['image.lut'] instead.
matplotlib.colorbar.Colorbar.patch3.7.0patch was deprecated in Matplotlib 3.5. Use ax instead.
matplotlib.dates.epoch2num3.7.0epoch2num was deprecated in Matplotlib 3.5. Use [date2num(datetime.utcfromtimestamp(t)) for t in e] or numpy.datetime64 types instead.
matplotlib.dates.num2epoch3.7.0num2epoch was deprecated in Matplotlib 3.5. Use `num2date(e).timestamp()<.num2date>` instead.
matplotlib.font_manager.get_fontconfig_fonts3.7.0get_fontconfig_fonts was deprecated in Matplotlib 3.5.
matplotlib.font_manager.win32InstalledFonts3.7.0win32InstalledFonts was deprecated in Matplotlib 3.5.
matplotlib.text.Text.get_prop_tup3.7.0get_prop_tup was deprecated in Matplotlib 3.5.
matplotlib.afm3.8.0The matplotlib.afm module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.checkdep_usetex3.8.0checkdep_usetex was deprecated in Matplotlib 3.6. Use a vendored copy of this function instead.
matplotlib.docstring3.8.0The matplotlib.docstring module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.fontconfig_pattern3.8.0The matplotlib.fontconfig_pattern module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.tight_bbox3.8.0The matplotlib.tight_bbox module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.tight_layout3.8.0The matplotlib.tight_layout module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.type1font3.8.0The matplotlib.type1font module was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
matplotlib.axes.Axes.get_renderer_cache3.8.0get_renderer_cache was deprecated in Matplotlib 3.6. Use Axes.figure.canvas.get_renderer() instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.button_press_event3.8.0button_press_event was deprecated in Matplotlib 3.6. Use callbacks.process('button_press_event', MouseEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.button_release_event3.8.0button_release_event was deprecated in Matplotlib 3.6. Use callbacks.process('button_release_event', MouseEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.close_event3.8.0close_event was deprecated in Matplotlib 3.6. Use callbacks.process('close_event', CloseEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.draw_event3.8.0draw_event was deprecated in Matplotlib 3.6. Use callbacks.process('draw_event', DrawEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.enter_notify_event3.8.0enter_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('enter_notify_event', LocationEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.key_press_event3.8.0key_press_event was deprecated in Matplotlib 3.6. Use callbacks.process('key_press_event', KeyEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.key_release_event3.8.0key_release_event was deprecated in Matplotlib 3.6. Use callbacks.process('key_release_event', KeyEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.leave_notify_event3.8.0leave_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('leave_notify_event', LocationEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.motion_notify_event3.8.0motion_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('motion_notify_event', MouseEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.pick3.8.0pick was deprecated in Matplotlib 3.6. Use canvas.figure.pick instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.pick_event3.8.0pick_event was deprecated in Matplotlib 3.6. Use callbacks.process('pick_event', PickEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.resize3.8.0resize was deprecated in Matplotlib 3.6. Use FigureManagerBase.resize instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.resize_event3.8.0resize_event was deprecated in Matplotlib 3.6. Use callbacks.process('resize_event', ResizeEvent(...)) instead.
matplotlib.backends.backend_agg.FigureCanvasAgg.scroll_event3.8.0scroll_event was deprecated in Matplotlib 3.6. Use callbacks.process('scroll_event', MouseEvent(...)) instead.
matplotlib.cbook.MatplotlibDeprecationWarning3.8.0MatplotlibDeprecationWarning was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use matplotlib.MatplotlibDeprecationWarning instead.
matplotlib.cbook.maxdict3.8.0maxdict was deprecated in Matplotlib 3.6. Use functools.lru_cache instead.
matplotlib.cbook.mplDeprecation3.8.0mplDeprecation was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use matplotlib.MatplotlibDeprecationWarning instead.
matplotlib.colorbar.Colorbar.draw_all3.8.0draw_all was deprecated in Matplotlib 3.6. Use fig.draw_without_rendering() instead.
matplotlib.colorbar.Colorbar.filled3.8.0filled was deprecated in Matplotlib 3.6.
matplotlib.dates.date_ticker_factory3.8.0date_ticker_factory was deprecated in Matplotlib 3.6. Use `AutoDateLocator` and `AutoDateFormatter` or vendor the code instead.
matplotlib.figure.Figure.callbacks3.8.0callbacks was deprecated in Matplotlib 3.6. Use the 'resize_event' signal in Figure.canvas.callbacks instead.
matplotlib.figure.Figure.execute_constrained_layout3.8.0execute_constrained_layout was deprecated in Matplotlib 3.6. Use figure.get_layout_engine().execute() instead.
matplotlib.mlab.stride_windows3.8.0stride_windows was deprecated in Matplotlib 3.6.
matplotlib.text.get_rotation3.8.0get_rotation was deprecated in Matplotlib 3.6.
matplotlib.ticker.is_close_to_int3.8.0is_close_to_int was deprecated in Matplotlib 3.6.
matplotlib.ticker.is_decade3.8.0is_decade was deprecated in Matplotlib 3.6.
mpl_toolkits.mplot3d.axes3d.Axes3D.dist3.8.0dist was deprecated in Matplotlib 3.6.
mpl_toolkits.mplot3d.axes3d.Axes3D.get_renderer_cache3.8.0get_renderer_cache was deprecated in Matplotlib 3.6. Use Axes.figure.canvas.get_renderer() instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.w_xaxis3.8.0w_xaxis was deprecated in Matplotlib 3.1. Use xaxis instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.w_yaxis3.8.0w_yaxis was deprecated in Matplotlib 3.1. Use yaxis instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.w_zaxis3.8.0w_zaxis was deprecated in Matplotlib 3.1. Use zaxis instead.
plt.style.use('seaborn')3.8.0plt.style.use('seaborn-v0_8'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-bright')3.8.0plt.style.use('seaborn-v0_8-bright'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-colorblind')3.8.0plt.style.use('seaborn-v0_8-colorblind'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-dark')3.8.0plt.style.use('seaborn-v0_8-dark'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-dark-palette')3.8.0plt.style.use('seaborn-v0_8-dark-palette'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-darkgrid')3.8.0plt.style.use('seaborn-v0_8-darkgrid'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-deep')3.8.0plt.style.use('seaborn-v0_8-deep'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-muted')3.8.0plt.style.use('seaborn-v0_8-muted'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-notebook')3.8.0plt.style.use('seaborn-v0_8-notebook'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-paper')3.8.0plt.style.use('seaborn-v0_8-paper'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-pastel')3.8.0plt.style.use('seaborn-v0_8-pastel'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-poster')3.8.0plt.style.use('seaborn-v0_8-poster'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-talk')3.8.0plt.style.use('seaborn-v0_8-talk'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-ticks')3.8.0plt.style.use('seaborn-v0_8-ticks'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-white')3.8.0plt.style.use('seaborn-v0_8-white'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
plt.style.use('seaborn-whitegrid')3.8.0plt.style.use('seaborn-v0_8-whitegrid'): the same style under the name matplotlib gave it in 3.6.0 (still there in 3.11.2), or seaborn's own seaborn.set_theme().
matplotlib.animation.FuncAnimation.repeat3.9.0repeat was deprecated in Matplotlib 3.7.
matplotlib.animation.FuncAnimation.save_count3.9.0save_count was deprecated in Matplotlib 3.7.
matplotlib.cm.register_cmap3.9.0register_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.register(name) instead.
matplotlib.cm.unregister_cmap3.9.0unregister_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.unregister(name) instead.
matplotlib.collections.BrokenBarHCollection3.9.0BrokenBarHCollection was deprecated in Matplotlib 3.7.
matplotlib.dates.julian2num3.9.0julian2num was deprecated in Matplotlib 3.7.
matplotlib.dates.JULIAN_OFFSET3.9.0The JULIAN_OFFSET attribute was deprecated in Matplotlib 3.7 and will be removed two minor releases later.
matplotlib.dates.num2julian3.9.0num2julian was deprecated in Matplotlib 3.7.
matplotlib.legend.Legend.legendHandles3.9.0legendHandles was deprecated in Matplotlib 3.7. Use legend_handles instead.
matplotlib.pyplot.register_cmap3.9.0register_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.register(name) instead.
mpl_toolkits.mplot3d.axes3d.Axes3D.eye3.9.0eye was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.sx3.9.0sx was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.sy3.9.0sy was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_cube3.9.0tunit_cube was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_edges3.9.0tunit_edges was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.unit_cube3.9.0unit_cube was deprecated in Matplotlib 3.7.
mpl_toolkits.mplot3d.axes3d.Axes3D.vvec3.9.0vvec was deprecated in Matplotlib 3.7.
matplotlib.backends.backend_agg.FigureCanvasAgg.switch_backends3.10.0switch_backends was deprecated in Matplotlib 3.8.
matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_rgb3.10.0tostring_rgb was deprecated in Matplotlib 3.8. Use buffer_rgba instead.
matplotlib.cbook.Stack3.10.0Stack was deprecated in Matplotlib 3.8.
matplotlib.axes.Axes.plot_date3.11.0plot_date was deprecated in Matplotlib 3.9. Use plot instead.
matplotlib.cm.get_cmap3.11.0 (also missing in 3.9.0)get_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps[name] or matplotlib.colormaps.get_cmap() or pyplot.get_cmap() instead.
matplotlib.pyplot.plot_date3.11.0plot_date was deprecated in Matplotlib 3.9. Use plot instead.
matplotlib.rcsetup.all_backends3.11.0The all_backends attribute was deprecated in Matplotlib 3.9 and will be removed in 3.11. Use matplotlib.backends.backend_registry.list_builtin() instead.
matplotlib.rcsetup.interactive_bk3.11.0The interactive_bk attribute was deprecated in Matplotlib 3.9 and will be removed in 3.11. Use matplotlib.backends.backend_registry.list_builtin(matplotlib.backends.BackendFilter.INTERACTIVE) instead.
matplotlib.rcsetup.non_interactive_bk3.11.0The non_interactive_bk attribute was deprecated in Matplotlib 3.9 and will be removed in 3.11. Use matplotlib.backends.backend_registry.list_builtin(matplotlib.backends.BackendFilter.NON_INTERACTIVE) instead.
matplotlib.transforms.BboxTransformToMaxOnly3.11.0BboxTransformToMaxOnly was deprecated in Matplotlib 3.9.
mpl_toolkits.mplot3d.axes3d.Axes3D.plot_date3.11.0plot_date was deprecated in Matplotlib 3.9. Use plot instead.

How was this measured?

Each of 48 matplotlib releases (every release with a Linux x86-64 wheel from 3.1.2 to 3.11.2, patch releases included) was installed from PyPI in its own environment, the public names of 31 matplotlib modules and of 10 classes were listed with dir(), and getattr was run for the union of all names in every release. A class member that is not on the class (set in __init__, as Legend.legendHandles was before 3.7) was checked with hasattr on a real object of that class, built on the Agg canvas. Every style name was tried with plt.style.context(name). Releases: 3.1.2, 3.1.3 (Python 3.8); 3.2.0, 3.2.1, 3.2.2 (Python 3.8); 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4 (Python 3.8); 3.4.0, 3.4.1, 3.4.2, 3.4.3 (Python 3.9); 3.5.0, 3.5.1, 3.5.2, 3.5.3 (Python 3.9); 3.6.0, 3.6.1, 3.6.2, 3.6.3 (Python 3.10); 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5 (Python 3.11); 3.8.0, 3.8.1, 3.8.2, 3.8.3, 3.8.4 (Python 3.12); 3.9.0, 3.9.2, 3.9.3, 3.9.4 (Python 3.12); 3.10.0, 3.10.1, 3.10.3, 3.10.5, 3.10.6, 3.10.7, 3.10.8, 3.10.9 (Python 3.12); 3.11.0, 3.11.1, 3.11.2 (Python 3.12). 3.9.1 is yanked on PyPI and is not in the table; 3.1.0 and 3.1.1 have no wheel for the Pythons used here.

Most matplotlib modules have no __all__, so the table keeps class members, __all__ names and the names matplotlib itself deprecated (a warning on access, or an _api.deprecated decorator or warning in the definition); helpers a module merely imported are left out, but the lookup still answers for them. The text is read from the installed source of the last release that had the name; @_api.deprecated("3.8", alternative="buffer_rgba") is turned into a sentence of the same content.

Questions

How do I fix "module 'matplotlib.cm' has no attribute 'get_cmap'"?

matplotlib 3.11.0 (2026-06-12) removed matplotlib.cm.get_cmap; it was deprecated in 3.7. 3.9.0 had removed it too; 3.9.1 (yanked on PyPI) and 3.9.2 put it back. Use matplotlib.colormaps[name] (from 3.5.0) or matplotlib.colormaps.get_cmap(name), or plt.get_cmap(name), which is still in 3.11.2. cm.register_cmap went in 3.9.0: use matplotlib.colormaps.register(cmap, name=...).

How do I fix "'FigureCanvasAgg' object has no attribute 'tostring_rgb'"?

matplotlib 3.10.0 (2024-12-14) removed tostring_rgb; it was deprecated in 3.8. Use fig.canvas.draw() and then np.asarray(fig.canvas.buffer_rgba()), an (height, width, 4) RGBA array; take [..., :3] for RGB. tostring_argb is still there in 3.11.2.

How do I fix "'seaborn' is not a valid package style"?

matplotlib 3.6.0 renamed its seaborn styles to seaborn-v0_8-<name> and warned on the old names; 3.8.0 (2023-09-15) dropped the old names. Use plt.style.use('seaborn-v0_8-whitegrid') (or the matching name), or seaborn's own seaborn.set_theme().

How do I fix "'Legend' object has no attribute 'legendHandles'"?

matplotlib 3.9.0 removed legendHandles; it was deprecated in 3.7. Use legend.legend_handles (a list, same content).

How do I fix "'Axes' object has no attribute 'plot_date'"?

matplotlib 3.11.0 removed Axes.plot_date and pyplot.plot_date; they were deprecated in 3.9. Pass the dates to ax.plot directly (datetime or numpy datetime64 values are converted for you), with linestyle and marker as you want.

Sources

The same data as JSON: matplotlib_names.json, licensed CC BY 4.0.

Related: "module 'numpy' has no attribute 'float_'" · "module 'PIL.Image' has no attribute 'ANTIALIAS'" · "'DataFrame' object has no attribute 'append'".