psyplot_gui package

psyplot-gui

Graphical user interface for the psyplot package

Classes:

ListGuiPluginsAction(option_strings[, dest, ...])

Data:

UNIT_TESTING

A boolean variable to check if the GUI is tested.

Functions:

get_parser([create])

Return a parser to make that can be used to make plots or open files from the command line

get_versions([requirements])

send_files_to_psyplot(callback, fnames, ...)

Simple socket client used to send the args passed to the psyplot executable to an already running instance.

start_app([fnames, name, dims, plot_method, ...])

Eventually start the QApplication or only make a plot

class psyplot_gui.ListGuiPluginsAction(option_strings, dest='==SUPPRESS==', nargs=None, default='==SUPPRESS==', **kwargs)[source]

Bases: Action

psyplot_gui.UNIT_TESTING = 'true'

A boolean variable to check if the GUI is tested. This is set automatically true on CI services

psyplot_gui.get_parser(create=True)[source]

Return a parser to make that can be used to make plots or open files from the command line

Returns:

The argparse.ArgumentParser instance

Return type:

psyplot.parser.FuncArgParser

See also

psyplot.main.get_parser, psyplot.parser.FuncArgParser, psyplot.main.main

psyplot_gui.get_versions(requirements=True)[source]
psyplot_gui.send_files_to_psyplot(callback, fnames, project, *args)[source]

Simple socket client used to send the args passed to the psyplot executable to an already running instance.

This function has to most parts been taken from spyder

psyplot_gui.start_app(fnames=[], name=[], dims=None, plot_method=None, output=None, project=None, engine=None, formatoptions=None, tight=False, encoding=None, enable_post=False, seaborn_style=None, output_project=None, concat_dim=None, chname={}, backend=False, new_instance=False, rc_file=None, rc_gui_file=None, include_plugins=None, exclude_plugins=[], offline=False, pwd=None, script=None, command=None, exec_=True, use_all=False, callback=None, preset=None, opengl_implementation=None, webengineview=True, decoder=None)[source]

Eventually start the QApplication or only make a plot

Parameters:
  • fnames (list of str) – Either the filenames to show, or, if the project parameter is set, the a list of ,-separated filenames to make a mapping from the original filename to a new one

  • name (list of str) – The variable names to plot if the output parameter is set

  • dims (dict) – A mapping from coordinate names to integers if the project is not given

  • plot_method (str) – The name of the plot_method to use

  • output (str or list of str) – If set, the data is loaded and the figures are saved to the specified filename and now graphical user interface is shown

  • project (str) – If set, the project located at the given file name is loaded

  • engine (str) – The engine to use for opening the dataset (see psyplot.data.open_dataset())

  • formatoptions (dict) – A dictionary of formatoption that is applied to the data visualized by the chosen plot_method

  • tight (bool) – If True/set, it is tried to figure out the tight bbox of the figure and adjust the paper size of the output to it

  • rc_file (str) – The path to a yaml configuration file that can be used to update the rcParams

  • encoding (str) – The encoding to use for loading the project. If None, it is automatically determined by pickle. Note: Set this to 'latin1' if using a project created with python2 on python3.

  • enable_post (bool) – Enable the post processing formatoption. If True/set, post processing scripts are enabled in the given project. Only set this if you are sure that you can trust the given project file because it may be a security vulnerability.

  • seaborn_style (str) – The name of the style of the seaborn package that can be used for the seaborn.set_style() function

  • output_project (str) – The name of a project file to save the project to

  • concat_dim (str) – The concatenation dimension if multiple files in fnames are provided

  • chname (dict) – A mapping from variable names in the project to variable names in the datasets that should be used instead

  • preset (str) – The filename or identifier of a preset. If the given preset is the path to an existing yaml file, it will be loaded. Otherwise we look up the preset in the psyplot configuration directory (see get_configdir()).

  • decoder (str) – Keyword arguments for the decoder.

  • backend (None or str) – The backend to use. By default, the 'gui.backend' key in the rcParams dictionary is used. Otherwise it can be None to use the standard matplotlib backend or a string identifying the backend

  • new_instance (bool) – If True/set and the output parameter is not set, a new application is created

  • rc_gui_file (str) – The path to a yaml configuration file that can be used to update the rcParams

  • include_plugins (list of str) – The plugin widget to include. Can be either None to load all that are not explicitly excluded by exclude_plugins or a list of plugins to include. List items can be either module names, plugin names or the module name and widget via '<module_name>:<widget>'

  • exclude_plugins (list of str) – The plugin widgets to exclude. Can be either 'all' to exclude all plugins or a list like in include_plugins.

  • offline (bool) – If True/set, psyplot will be started in offline mode without intersphinx and remote access for the help explorer

  • pwd (str) – The path to the working directory to use. Note if you do not provide any fnames or project, but set the pwd, it will switch the pwd of the current GUI.

  • script (str) – The path to a python script that shall be run in the GUI. If the GUI is already running, the commands will be executed in this GUI.

  • command (str) – Python commands that shall be run in the GUI. If the GUI is already running, the commands will be executed in this GUI

  • use_all (bool) – If True, use all variables. Note that this is the default if the output is specified and not name

  • exec (bool) – If True, the main loop is entered.

  • callback (str) – A unique identifier for the method that should be used if psyplot is already running. Set this parameter to None to avoid sending

  • opengl_implementation ({'software', 'desktop', 'gles', 'automatic'}) – OpenGL implementation to pass to Qt. Possible options are ‘software’, ‘desktop’, ‘gles’ and ‘automatic’ (which let’s PyQt decide).

  • webengineview (bool) – If True (default), use an HTML help widget. This might not be available for all builds of PyQt5 under all circumstances. If not set, the rcParams key 'help_explorer.use_webengineview' is used.

Returns:

None if exec_ is True, otherwise the created MainWindow instance

Return type:

None or psyplot_gui.main.MainWindow

Subpackages

Submodules