straditize.__main__ module

main module of straditize

Disclaimer

Copyright (C) 2018-2019 Philipp S. Sommer

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Functions

get_parser([create])

Create an argument parser for the command line handling

main([exec_])

start_app([fname, output, xlim, ylim, full, …])

Start the psyplot GUI with the straditizer setup

straditize.__main__.get_parser(create=True)[source]

Create an argument parser for the command line handling

This function creates a funcargparse.FuncArgParser for the usage from the command line

Parameters

create (bool) – If True, the funcargparse.FuncArgParser.create_arguments() method is called

straditize.__main__.main(exec_=True)[source]
straditize.__main__.start_app(fname=None, output=None, xlim=None, ylim=None, full=False, reader_type='area', **kwargs)[source]

Start the psyplot GUI with the straditizer setup

Parameters
  • fname (str) – Either the path to a picture to digitize or a previously saved straditizer project (ending with '.pkl')

  • output (str) – The path to the csv file where to save the digitized diagram

  • xlim (list of int of length 2) – The x-limits of the data part of the diagram

  • ylim (list of int of length 2) – The y-limits of the data part of the diagram

  • full (bool) – If True, the image is digitzed and x- and ylim are set to the entire share of the array

  • reader_type ({ 'area' | 'bars' | 'rounded bars' | 'stacked area' | 'line' }) – Specify the reader type

  • 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

  • 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

  • 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).