Plugin configuration
The psyplot GUI has several built-in plugins, e.g. the
help_explorer
or the fmt_widget
.
External libraries can add plugins and the user can
disable or enable them with through the configuration.
Note
These plugins should only affect the GUI. For other plugins that define new plotmethods, etc., see the psyplot documentation
Plugin configuration
You can include and exclude plugins either through the include-plugins
and
exclude-plugins
command line option (see Command line usage), or you
do it permanently with the rcParams
(see
Configuration of the GUI).
Developing plugins
External libraries insert the GUI as an entry point. In the setup.py
script of a package, include the following:
setup(
...,
entry_points={
"psyplot_gui": [
"widget-name1=widget-module1:widget-class-name1",
"widget-name2=widget-module2:widget-class-name2",
...,
],
},
...,
)
Here, widget-name1 is an arbitrary name you want to assign to the widget,
widget-module1 is the module from where to import the plugin, and
widget-class-name1 is the name of the class that inherits the
psyplot_gui.common.DockMixin
class.
For the help_explorer
, this, for example, would like like
setup(
...,
entry_points={
"psyplot_gui": [
"help=psyplot_gui.help_explorer:HelpExplorer",
],
},
...,
)