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.
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.
| Name | Removed in | Instead |
|---|---|---|
matplotlib.axes.Axes.mouseover_set | 3.2.0 | mouseover_set was deprecated in Matplotlib 3.0. |
matplotlib.cbook.Bunch | 3.2.0 | Bunch was deprecated in Matplotlib 3.0. Use types.SimpleNamespace instead. |
matplotlib.cbook.GetRealpathAndStat | 3.2.0 | GetRealpathAndStat was deprecated in Matplotlib 3.0. |
matplotlib.cbook.is_numlike | 3.2.0 | is_numlike was deprecated in Matplotlib 3.0. Use isinstance(..., numbers.Number) instead. |
matplotlib.cbook.listFiles | 3.2.0 | listFiles was deprecated in Matplotlib 3.0. |
matplotlib.cbook.Locked | 3.2.0 | Locked was deprecated in Matplotlib 3.0. |
matplotlib.cbook.mkdirs | 3.2.0 | mkdirs was deprecated in Matplotlib 3.0. |
matplotlib.cbook.unicode_safe | 3.2.0 | unicode_safe was deprecated in Matplotlib 3.0. |
matplotlib.font_manager.TempCache | 3.2.0 | TempCache was deprecated in Matplotlib 3.0. |
matplotlib.legend.is_hashable | 3.2.0 | is_hashable was deprecated in Matplotlib 3.1. Use isinstance(..., collections.abc.Hashable) instead. |
matplotlib.patches.YAArrow | 3.2.0 | YAArrow was deprecated in Matplotlib 3.0. Use FancyArrowPatch instead. |
matplotlib.pyplot.pylab_setup | 3.2.0 | pylab_setup was deprecated in Matplotlib 3.0. |
matplotlib.ticker.Base | 3.2.0 | Base was deprecated in Matplotlib 3.0. |
matplotlib.ticker.closeto | 3.2.0 | closeto was deprecated in Matplotlib 3.0. |
matplotlib.ticker.nearest_long | 3.2.0 | `nearest_long` was deprecated in Matplotlib 3.0. Use `round` instead. |
mpl_toolkits.axes_grid1.LocatableAxes | 3.2.0 | LocatableAxes was deprecated in Matplotlib 3.0. Use mpl_toolkits.axes_grid1.mpl_axes.Axes instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.mouseover_set | 3.2.0 | mouseover_set was deprecated in Matplotlib 3.0. |
matplotlib.checkdep_dvipng | 3.3.0 | checkdep_dvipng was deprecated in Matplotlib 3.1. |
matplotlib.checkdep_ghostscript | 3.3.0 | checkdep_ghostscript was deprecated in Matplotlib 3.1. |
matplotlib.checkdep_inkscape | 3.3.0 | checkdep_inkscape was deprecated in Matplotlib 3.1. |
matplotlib.checkdep_pdftops | 3.3.0 | checkdep_pdftops was deprecated in Matplotlib 3.1. |
matplotlib.dedent | 3.3.0 | dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead. |
matplotlib.get_label | 3.3.0 | get_label was deprecated in Matplotlib 3.1. |
matplotlib.get_py2exe_datafiles | 3.3.0 | get_py2exe_datafiles was deprecated in Matplotlib 3.1. |
matplotlib.tk_window_focus | 3.3.0 | tk_window_focus was deprecated in Matplotlib 3.1. Use rcParams['tk.window_focus'] instead. |
matplotlib.axes.Axes.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.cbook.dedent | 3.3.0 | dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead. |
matplotlib.cbook.get_label | 3.3.0 | get_label was deprecated in Matplotlib 3.1. |
matplotlib.cbook.is_hashable | 3.3.0 | is_hashable was deprecated in Matplotlib 3.1. Use isinstance(..., collections.abc.Hashable) instead. |
matplotlib.cbook.iterable | 3.3.0 | iterable was deprecated in Matplotlib 3.1. Use np.iterable instead. |
matplotlib.cbook.safezip | 3.3.0 | safezip was deprecated in Matplotlib 3.1. |
matplotlib.colorbar.Colorbar.get_clim | 3.3.0 | get_clim was deprecated in Matplotlib 3.1. Use ScalarMappable.get_clim instead. |
matplotlib.colorbar.Colorbar.get_cmap | 3.3.0 | get_cmap was deprecated in Matplotlib 3.1. Use ScalarMappable.get_cmap instead. |
matplotlib.colorbar.Colorbar.set_clim | 3.3.0 | set_clim was deprecated in Matplotlib 3.1. Use ScalarMappable.set_clim instead. |
matplotlib.colorbar.Colorbar.set_cmap | 3.3.0 | set_cmap was deprecated in Matplotlib 3.1. Use ScalarMappable.set_cmap instead. |
matplotlib.colorbar.Colorbar.set_norm | 3.3.0 | set_norm was deprecated in Matplotlib 3.1. Use ScalarMappable.set_norm instead. |
matplotlib.dates.bytespdate2num | 3.3.0 | bytespdate2num was deprecated in Matplotlib 3.1. Use time.strptime or dateutil.parser.parse or datestr2num instead. |
matplotlib.dates.hours | 3.3.0 | hours was deprecated in Matplotlib 3.1. |
matplotlib.dates.minutes | 3.3.0 | minutes was deprecated in Matplotlib 3.1. |
matplotlib.dates.seconds | 3.3.0 | seconds was deprecated in Matplotlib 3.1. |
matplotlib.dates.strpdate2num | 3.3.0 | strpdate2num was deprecated in Matplotlib 3.1. Use time.strptime or dateutil.parser.parse or datestr2num instead. |
matplotlib.dates.weeks | 3.3.0 | weeks was deprecated in Matplotlib 3.1. |
matplotlib.figure.process_projection_requirements | 3.3.0 | process_projection_requirements was deprecated in Matplotlib 3.1. |
matplotlib.figure.TextWithDash | 3.3.0 | TextWithDash was deprecated in Matplotlib 3.1. Use Annotation instead. |
matplotlib.figure.Figure.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.font_manager.OSXInstalledFonts | 3.3.0 | OSXInstalledFonts was deprecated in Matplotlib 3.1. |
matplotlib.legend.Legend.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.lines.Line2D.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.lines.Line2D.verticalOffset | 3.3.0 | verticalOffset was deprecated in Matplotlib 3.1. |
matplotlib.mlab.demean | 3.3.0 | demean was deprecated in Matplotlib 3.1. Use detrend_mean instead. |
matplotlib.path.get_paths_extents | 3.3.0 | get_paths_extents was deprecated in Matplotlib 3.1. Use get_paths_collection_extents instead. |
matplotlib.pyplot.dedent | 3.3.0 | dedent was deprecated in Matplotlib 3.1. Use inspect.cleandoc instead. |
matplotlib.pyplot.get_scale_docs | 3.3.0 | get_scale_docs() is considered private API since 3.1 and will be removed from the public API in 3.3. |
matplotlib.pyplot.plotfile | 3.3.0 | plotfile was deprecated in Matplotlib 3.1. |
matplotlib.rcsetup.validate_qt4 | 3.3.0 | validate_qt4 was deprecated in Matplotlib 3.1. |
matplotlib.rcsetup.validate_qt5 | 3.3.0 | validate_qt5 was deprecated in Matplotlib 3.1. |
matplotlib.rcsetup.validate_verbose | 3.3.0 | validate_verbose was deprecated in Matplotlib 3.1. |
matplotlib.rcsetup.ValidateInterval | 3.3.0 | ValidateInterval was deprecated in Matplotlib 3.2. |
matplotlib.text.TextWithDash | 3.3.0 | TextWithDash was deprecated in Matplotlib 3.1. Use Annotation instead. |
matplotlib.text.Text.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.text.Text.is_math_text | 3.3.0 | is_math_text was deprecated in Matplotlib 3.1. |
matplotlib.ticker.decade_down | 3.3.0 | decade_down was deprecated in Matplotlib 3.1. |
matplotlib.ticker.decade_up | 3.3.0 | decade_up was deprecated in Matplotlib 3.1. |
mpl_toolkits.mplot3d.axes3d.Axes3D.aname | 3.3.0 | aname was deprecated in Matplotlib 3.1. |
matplotlib.checkdep_ps_distiller | 3.4.0 | checkdep_ps_distiller was deprecated in Matplotlib 3.2. |
matplotlib.compare_versions | 3.4.0 | compare_versions was deprecated in Matplotlib 3.2. |
matplotlib.get_home | 3.4.0 | get_home was deprecated in Matplotlib 3.2. Use os.path.expanduser('~') instead. |
matplotlib.axes.Axes.get_data_ratio_log | 3.4.0 | get_data_ratio_log was deprecated in Matplotlib 3.2. |
matplotlib.backends.backend_agg.FigureCanvasAgg.draw_cursor | 3.4.0 | draw_cursor was deprecated in Matplotlib 3.2. |
matplotlib.cm.revcmap | 3.4.0 | revcmap was deprecated in Matplotlib 3.2. Use Colormap.reversed() instead. |
matplotlib.colors.DivergingNorm | 3.4.0 | DivergingNorm was deprecated in Matplotlib 3.2. Use TwoSlopeNorm instead. |
matplotlib.colors.makeMappingArray | 3.4.0 | makeMappingArray was deprecated in Matplotlib 3.2. This is not considered public API any longer. |
matplotlib.dates.mx2num | 3.4.0 | mx2num was deprecated in Matplotlib 3.2. |
matplotlib.figure.AxesStack | 3.4.0 | AxesStack was deprecated in Matplotlib 3.2. |
matplotlib.figure.Figure.init_layoutbox | 3.4.0 | |
matplotlib.font_manager.createFontList | 3.4.0 | createFontList was deprecated in Matplotlib 3.2. Use FontManager.addfont instead. |
matplotlib.font_manager.JSONEncoder | 3.4.0 | JSONEncoder was deprecated in Matplotlib 3.2. Use json_dump instead. |
matplotlib.mlab.apply_window | 3.4.0 | apply_window was deprecated in Matplotlib 3.2. |
matplotlib.mlab.stride_repeat | 3.4.0 | stride_repeat was deprecated in Matplotlib 3.2. |
matplotlib.rcsetup.update_savefig_format | 3.4.0 | update_savefig_format was deprecated in Matplotlib 3.2. |
matplotlib.rcsetup.validate_animation_writer_path | 3.4.0 | validate_animation_writer_path was deprecated in Matplotlib 3.2. |
matplotlib.rcsetup.validate_path_exists | 3.4.0 | validate_path_exists was deprecated in Matplotlib 3.2. Use os.path.exists instead. |
mpl_toolkits.axes_grid1.colorbar | 3.4.0 | The 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_bbox | 3.4.0 | unit_bbox was deprecated in Matplotlib 3.2. Use Bbox.unit() instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.get_data_ratio_log | 3.4.0 | get_data_ratio_log was deprecated in Matplotlib 3.2. |
matplotlib.compat | 3.5.0 | The matplotlib.compat module was deprecated in Matplotlib 3.3 and will be removed two minor releases later. |
matplotlib.ttconv | 3.5.0 | The matplotlib.ttconv module was deprecated in Matplotlib 3.3 and will be removed two minor releases later. |
matplotlib.animation.AVConvBase | 3.5.0 | AVConvBase was deprecated in Matplotlib 3.3. |
matplotlib.axes.Axes.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
matplotlib.axes.Axes.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
matplotlib.axes.Axes.update_datalim_bounds | 3.5.0 | update_datalim_bounds was deprecated in Matplotlib 3.3. Use ax.dataLim.set(Bbox.union([ax.dataLim, bounds])) instead. |
matplotlib.backend_bases.StatusbarBase | 3.5.0 | StatusbarBase was deprecated in Matplotlib 3.3. |
matplotlib.cbook.get_realpath_and_stat | 3.5.0 | get_realpath_and_stat was deprecated in Matplotlib 3.3. Use os.path.realpath and os.stat instead. |
matplotlib.cbook.IgnoredKeywordWarning | 3.5.0 | IgnoredKeywordWarning was deprecated in Matplotlib 3.3. |
matplotlib.cbook.local_over_kwdict | 3.5.0 | local_over_kwdict was deprecated in Matplotlib 3.3. Use normalize_kwargs instead. |
matplotlib.colorbar.Colorbar.config_axis | 3.5.0 | config_axis was deprecated in Matplotlib 3.3. |
matplotlib.colorbar.Colorbar.on_mappable_changed | 3.5.0 | on_mappable_changed was deprecated in Matplotlib 3.3. Use update_normal instead. |
matplotlib.colorbar.Colorbar.update_bruteforce | 3.5.0 | update_bruteforce was deprecated in Matplotlib 3.3. Use update_normal instead. |
matplotlib.dates.IndexDateFormatter | 3.5.0 | IndexDateFormatter was deprecated in Matplotlib 3.3. |
matplotlib.figure.Figure.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
matplotlib.figure.Figure.init_layoutgrid | 3.5.0 | |
matplotlib.figure.Figure.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
matplotlib.legend.Legend.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
matplotlib.legend.Legend.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
matplotlib.lines.Line2D.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
matplotlib.lines.Line2D.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
matplotlib.rcsetup.validate_bool_maybe_none | 3.5.0 | validate_bool_maybe_none was deprecated in Matplotlib 3.3. |
matplotlib.rcsetup.validate_hinting | 3.5.0 | validate_hinting was deprecated in Matplotlib 3.3. |
matplotlib.rcsetup.validate_movie_writer | 3.5.0 | validate_movie_writer was deprecated in Matplotlib 3.3. |
matplotlib.rcsetup.validate_nseq_float | 3.5.0 | validate_nseq_float was deprecated in Matplotlib 3.3. |
matplotlib.rcsetup.validate_nseq_int | 3.5.0 | validate_nseq_int was deprecated in Matplotlib 3.3. |
matplotlib.rcsetup.validate_webagg_address | 3.5.0 | validate_webagg_address was deprecated in Matplotlib 3.3. |
matplotlib.text.Text.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
matplotlib.text.Text.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
matplotlib.ticker.IndexFormatter | 3.5.0 | IndexFormatter was deprecated in Matplotlib 3.3. |
matplotlib.ticker.OldAutoLocator | 3.5.0 | OldAutoLocator was deprecated in Matplotlib 3.3. |
matplotlib.ticker.OldScalarFormatter | 3.5.0 | OldScalarFormatter was deprecated in Matplotlib 3.3. |
mpl_toolkits.mplot3d.axes3d.Axes3D.get_contains | 3.5.0 | get_contains was deprecated in Matplotlib 3.3. Use get_picker instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.set_contains | 3.5.0 | set_contains was deprecated in Matplotlib 3.3. Use set_picker instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.update_datalim_bounds | 3.5.0 | update_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_title | 3.6.0 | get_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_title | 3.6.0 | set_window_title was deprecated in Matplotlib 3.4. Use `.FigureManagerBase.set_window_title` or GUI-specific methods instead. |
matplotlib.cbook.deprecated | 3.6.0 | deprecated was deprecated in Matplotlib 3.4. |
matplotlib.cbook.deprecation | 3.6.0 | The module matplotlib.cbook.deprecation is considered internal and it will be made private in the future. |
matplotlib.cbook.warn_deprecated | 3.6.0 | warn_deprecated was deprecated in Matplotlib 3.4. |
matplotlib.colorbar.colorbar_doc | 3.6.0 | colorbar_doc was deprecated in Matplotlib 3.4 and will be removed two minor releases later. |
matplotlib.colorbar.colorbar_factory | 3.6.0 | colorbar_factory was deprecated in Matplotlib 3.4. Use Colorbar instead. |
matplotlib.colorbar.ColorbarPatch | 3.6.0 | ColorbarPatch was deprecated in Matplotlib 3.4. Use Colorbar instead. |
matplotlib.colorbar.make_axes_kw_doc | 3.6.0 | make_axes_kw_doc was deprecated in Matplotlib 3.4 and will be removed two minor releases later. |
matplotlib.lines.Line2D.validCap | 3.6.0 | The validCap attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later. |
matplotlib.lines.Line2D.validJoin | 3.6.0 | The validJoin attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later. |
matplotlib.blocking_input | 3.7.0 | The matplotlib.blocking_input module was deprecated in Matplotlib 3.5 and will be removed two minor releases later. |
matplotlib.is_url | 3.7.0 | is_url was deprecated in Matplotlib 3.5. |
matplotlib.test | 3.7.0 | test was deprecated in Matplotlib 3.5. Use pytest instead. |
matplotlib.URL_REGEX | 3.7.0 | URL_REGEX was deprecated in Matplotlib 3.5 and will be removed two minor releases later. |
matplotlib.cbook.report_memory | 3.7.0 | report_memory was deprecated in Matplotlib 3.5. Use psutil.virtual_memory instead. |
matplotlib.cm.LUTSIZE | 3.7.0 | LUTSIZE was deprecated in Matplotlib 3.5 and will be removed two minor releases later. Use rcParams['image.lut'] instead. |
matplotlib.colorbar.Colorbar.patch | 3.7.0 | patch was deprecated in Matplotlib 3.5. Use ax instead. |
matplotlib.dates.epoch2num | 3.7.0 | epoch2num was deprecated in Matplotlib 3.5. Use [date2num(datetime.utcfromtimestamp(t)) for t in e] or numpy.datetime64 types instead. |
matplotlib.dates.num2epoch | 3.7.0 | num2epoch was deprecated in Matplotlib 3.5. Use `num2date(e).timestamp()<.num2date>` instead. |
matplotlib.font_manager.get_fontconfig_fonts | 3.7.0 | get_fontconfig_fonts was deprecated in Matplotlib 3.5. |
matplotlib.font_manager.win32InstalledFonts | 3.7.0 | win32InstalledFonts was deprecated in Matplotlib 3.5. |
matplotlib.text.Text.get_prop_tup | 3.7.0 | get_prop_tup was deprecated in Matplotlib 3.5. |
matplotlib.afm | 3.8.0 | The matplotlib.afm module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.checkdep_usetex | 3.8.0 | checkdep_usetex was deprecated in Matplotlib 3.6. Use a vendored copy of this function instead. |
matplotlib.docstring | 3.8.0 | The matplotlib.docstring module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.fontconfig_pattern | 3.8.0 | The matplotlib.fontconfig_pattern module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.tight_bbox | 3.8.0 | The matplotlib.tight_bbox module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.tight_layout | 3.8.0 | The matplotlib.tight_layout module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.type1font | 3.8.0 | The matplotlib.type1font module was deprecated in Matplotlib 3.6 and will be removed two minor releases later. |
matplotlib.axes.Axes.get_renderer_cache | 3.8.0 | get_renderer_cache was deprecated in Matplotlib 3.6. Use Axes.figure.canvas.get_renderer() instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.button_press_event | 3.8.0 | button_press_event was deprecated in Matplotlib 3.6. Use callbacks.process('button_press_event', MouseEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.button_release_event | 3.8.0 | button_release_event was deprecated in Matplotlib 3.6. Use callbacks.process('button_release_event', MouseEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.close_event | 3.8.0 | close_event was deprecated in Matplotlib 3.6. Use callbacks.process('close_event', CloseEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.draw_event | 3.8.0 | draw_event was deprecated in Matplotlib 3.6. Use callbacks.process('draw_event', DrawEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.enter_notify_event | 3.8.0 | enter_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('enter_notify_event', LocationEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.key_press_event | 3.8.0 | key_press_event was deprecated in Matplotlib 3.6. Use callbacks.process('key_press_event', KeyEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.key_release_event | 3.8.0 | key_release_event was deprecated in Matplotlib 3.6. Use callbacks.process('key_release_event', KeyEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.leave_notify_event | 3.8.0 | leave_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('leave_notify_event', LocationEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.motion_notify_event | 3.8.0 | motion_notify_event was deprecated in Matplotlib 3.6. Use callbacks.process('motion_notify_event', MouseEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.pick | 3.8.0 | pick was deprecated in Matplotlib 3.6. Use canvas.figure.pick instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.pick_event | 3.8.0 | pick_event was deprecated in Matplotlib 3.6. Use callbacks.process('pick_event', PickEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.resize | 3.8.0 | resize was deprecated in Matplotlib 3.6. Use FigureManagerBase.resize instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.resize_event | 3.8.0 | resize_event was deprecated in Matplotlib 3.6. Use callbacks.process('resize_event', ResizeEvent(...)) instead. |
matplotlib.backends.backend_agg.FigureCanvasAgg.scroll_event | 3.8.0 | scroll_event was deprecated in Matplotlib 3.6. Use callbacks.process('scroll_event', MouseEvent(...)) instead. |
matplotlib.cbook.MatplotlibDeprecationWarning | 3.8.0 | MatplotlibDeprecationWarning was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use matplotlib.MatplotlibDeprecationWarning instead. |
matplotlib.cbook.maxdict | 3.8.0 | maxdict was deprecated in Matplotlib 3.6. Use functools.lru_cache instead. |
matplotlib.cbook.mplDeprecation | 3.8.0 | mplDeprecation was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use matplotlib.MatplotlibDeprecationWarning instead. |
matplotlib.colorbar.Colorbar.draw_all | 3.8.0 | draw_all was deprecated in Matplotlib 3.6. Use fig.draw_without_rendering() instead. |
matplotlib.colorbar.Colorbar.filled | 3.8.0 | filled was deprecated in Matplotlib 3.6. |
matplotlib.dates.date_ticker_factory | 3.8.0 | date_ticker_factory was deprecated in Matplotlib 3.6. Use `AutoDateLocator` and `AutoDateFormatter` or vendor the code instead. |
matplotlib.figure.Figure.callbacks | 3.8.0 | callbacks was deprecated in Matplotlib 3.6. Use the 'resize_event' signal in Figure.canvas.callbacks instead. |
matplotlib.figure.Figure.execute_constrained_layout | 3.8.0 | execute_constrained_layout was deprecated in Matplotlib 3.6. Use figure.get_layout_engine().execute() instead. |
matplotlib.mlab.stride_windows | 3.8.0 | stride_windows was deprecated in Matplotlib 3.6. |
matplotlib.text.get_rotation | 3.8.0 | get_rotation was deprecated in Matplotlib 3.6. |
matplotlib.ticker.is_close_to_int | 3.8.0 | is_close_to_int was deprecated in Matplotlib 3.6. |
matplotlib.ticker.is_decade | 3.8.0 | is_decade was deprecated in Matplotlib 3.6. |
mpl_toolkits.mplot3d.axes3d.Axes3D.dist | 3.8.0 | dist was deprecated in Matplotlib 3.6. |
mpl_toolkits.mplot3d.axes3d.Axes3D.get_renderer_cache | 3.8.0 | get_renderer_cache was deprecated in Matplotlib 3.6. Use Axes.figure.canvas.get_renderer() instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.w_xaxis | 3.8.0 | w_xaxis was deprecated in Matplotlib 3.1. Use xaxis instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.w_yaxis | 3.8.0 | w_yaxis was deprecated in Matplotlib 3.1. Use yaxis instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.w_zaxis | 3.8.0 | w_zaxis was deprecated in Matplotlib 3.1. Use zaxis instead. |
plt.style.use('seaborn') | 3.8.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.0 | plt.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.repeat | 3.9.0 | repeat was deprecated in Matplotlib 3.7. |
matplotlib.animation.FuncAnimation.save_count | 3.9.0 | save_count was deprecated in Matplotlib 3.7. |
matplotlib.cm.register_cmap | 3.9.0 | register_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.register(name) instead. |
matplotlib.cm.unregister_cmap | 3.9.0 | unregister_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.unregister(name) instead. |
matplotlib.collections.BrokenBarHCollection | 3.9.0 | BrokenBarHCollection was deprecated in Matplotlib 3.7. |
matplotlib.dates.julian2num | 3.9.0 | julian2num was deprecated in Matplotlib 3.7. |
matplotlib.dates.JULIAN_OFFSET | 3.9.0 | The JULIAN_OFFSET attribute was deprecated in Matplotlib 3.7 and will be removed two minor releases later. |
matplotlib.dates.num2julian | 3.9.0 | num2julian was deprecated in Matplotlib 3.7. |
matplotlib.legend.Legend.legendHandles | 3.9.0 | legendHandles was deprecated in Matplotlib 3.7. Use legend_handles instead. |
matplotlib.pyplot.register_cmap | 3.9.0 | register_cmap was deprecated in Matplotlib 3.7. Use matplotlib.colormaps.register(name) instead. |
mpl_toolkits.mplot3d.axes3d.Axes3D.eye | 3.9.0 | eye was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.sx | 3.9.0 | sx was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.sy | 3.9.0 | sy was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_cube | 3.9.0 | tunit_cube was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_edges | 3.9.0 | tunit_edges was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.unit_cube | 3.9.0 | unit_cube was deprecated in Matplotlib 3.7. |
mpl_toolkits.mplot3d.axes3d.Axes3D.vvec | 3.9.0 | vvec was deprecated in Matplotlib 3.7. |
matplotlib.backends.backend_agg.FigureCanvasAgg.switch_backends | 3.10.0 | switch_backends was deprecated in Matplotlib 3.8. |
matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_rgb | 3.10.0 | tostring_rgb was deprecated in Matplotlib 3.8. Use buffer_rgba instead. |
matplotlib.cbook.Stack | 3.10.0 | Stack was deprecated in Matplotlib 3.8. |
matplotlib.axes.Axes.plot_date | 3.11.0 | plot_date was deprecated in Matplotlib 3.9. Use plot instead. |
matplotlib.cm.get_cmap | 3.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_date | 3.11.0 | plot_date was deprecated in Matplotlib 3.9. Use plot instead. |
matplotlib.rcsetup.all_backends | 3.11.0 | The 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_bk | 3.11.0 | The 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_bk | 3.11.0 | The 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.BboxTransformToMaxOnly | 3.11.0 | BboxTransformToMaxOnly was deprecated in Matplotlib 3.9. |
mpl_toolkits.mplot3d.axes3d.Axes3D.plot_date | 3.11.0 | plot_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 matplotlib wheels on PyPI, installed and run, and their source as installed; the release dates are PyPI's.
- matplotlib's API changes for each release.
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'".