Get a sorted list of all of the plotting commands.
()
| 1780 | |
| 1781 | |
| 1782 | def get_plot_commands(): |
| 1783 | """ |
| 1784 | Get a sorted list of all of the plotting commands. |
| 1785 | """ |
| 1786 | # This works by searching for all functions in this module and removing |
| 1787 | # a few hard-coded exclusions, as well as all of the colormap-setting |
| 1788 | # functions, and anything marked as private with a preceding underscore. |
| 1789 | exclude = {'colormaps', 'colors', 'connect', 'disconnect', |
| 1790 | 'get_plot_commands', 'get_current_fig_manager', 'ginput', |
| 1791 | 'plotting', 'waitforbuttonpress'} |
| 1792 | exclude |= set(colormaps()) |
| 1793 | this_module = inspect.getmodule(get_plot_commands) |
| 1794 | return sorted( |
| 1795 | name for name, obj in globals().items() |
| 1796 | if not name.startswith('_') and name not in exclude |
| 1797 | and inspect.isfunction(obj) |
| 1798 | and inspect.getmodule(obj) is this_module) |
| 1799 | |
| 1800 | |
| 1801 | def colormaps(): |
no test coverage detected