@@ -2028,20 +2028,23 @@ def thetagrids(angles=None, labels=None, fmt=None, **kwargs):
20282028 return lines , labels
20292029
20302030
2031- _NON_PLOT_COMMANDS = {
2032- 'connect' , 'disconnect' , 'get_current_fig_manager' , 'ginput' ,
2033- 'new_figure_manager' , 'waitforbuttonpress' }
2034-
2035-
2031+ @_api .deprecated ("3.7" , pending = True )
20362032def get_plot_commands ():
20372033 """
20382034 Get a sorted list of all of the plotting commands.
20392035 """
2036+ NON_PLOT_COMMANDS = {
2037+ 'connect' , 'disconnect' , 'get_current_fig_manager' , 'ginput' ,
2038+ 'new_figure_manager' , 'waitforbuttonpress' }
2039+ return (name for name in _get_pyplot_commands ()
2040+ if name not in NON_PLOT_COMMANDS )
2041+
2042+
2043+ def _get_pyplot_commands ():
20402044 # This works by searching for all functions in this module and removing
20412045 # a few hard-coded exclusions, as well as all of the colormap-setting
20422046 # functions, and anything marked as private with a preceding underscore.
2043- exclude = {'colormaps' , 'colors' , 'get_plot_commands' ,
2044- * _NON_PLOT_COMMANDS , * colormaps }
2047+ exclude = {'colormaps' , 'colors' , 'get_plot_commands' , * colormaps }
20452048 this_module = inspect .getmodule (get_plot_commands )
20462049 return sorted (
20472050 name for name , obj in globals ().items ()
0 commit comments