diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index f1e2918080c9..3a3f919d1686 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2066,8 +2066,8 @@ def get_plot_commands(): NON_PLOT_COMMANDS = { 'connect', 'disconnect', 'get_current_fig_manager', 'ginput', 'new_figure_manager', 'waitforbuttonpress'} - return (name for name in _get_pyplot_commands() - if name not in NON_PLOT_COMMANDS) + return [name for name in _get_pyplot_commands() + if name not in NON_PLOT_COMMANDS] def _get_pyplot_commands():