plotting

sans.guiframe.local_perspectives.plotting.plotting

class sans.guiframe.local_perspectives.plotting.plotting.Plugin(standalone=False)

Bases: sans.guiframe.plugin_base.PluginBase

Plug-in class to be instantiated by the GUI manager

add_color(color, id)

Adds color to a plugin

can_load_data()

if return True, then call handler to laod data

clear_panel()

Clear and Hide all plot panels, and remove them from menu

clear_panel_by_id(group_id)

clear the graph

create_1d_panel(data, group_id)
create_2d_panel(data, group_id)
create_panel_helper(new_panel, data, group_id, title=None)
delete_data(data_id)

Delete all references of data which id are in data_list.

delete_menu_item(name, uid)
delete_panel(group_id)
get_context_menu(plotpanel=None)

This method is optional.

When the context menu of a plot is rendered, the get_context_menu method will be called to give you a chance to add a menu item to the context menu.

A ref to a plotpanel object is passed so that you can investigate the plot content and decide whether you need to add items to the context menu.

This method returns a list of menu items. Each item is itself a list defining the text to appear in the menu, a tool-tip help text, and a call-back method.

Parameters:graph – the Graph object to which we attach the context menu
Returns:a list of menu items with call-back function
get_extensions()

return state reader and its extensions

get_panels(parent)

Create and return a list of panel objects

get_perspective()

Get the list of panel names for this perspective

get_tools()

Returns a set of menu entries for tools

help(evt)

Show a general help dialog.

hide_panel(group_id)

hide panel with group ID = group_id

is_always_active()

return True is this plugin is always active even if the user is switching between perspectives

is_in_use(data_id)
get a data id a list of data name if data data is
currently used by the plugin and the name of the plugin

data_name = ‘None’ in_use = False example [(data_name, self.sub_menu)]

load_data(event)

Load data

load_folder(event)

Load entire folder

on_batch_selection(flag)

need to be overwritten by the derivated class

on_perspective(event=None)

Call back function for the perspective menu item. We notify the parent window that the perspective has changed.

Parameters:event – menu event
on_set_state_helper(event)

update state

populate_file_menu()

Append menu item under file menu item of the frame

populate_menu(parent)

Create a ‘Plot’ menu to list the panels available for displaying

Parameters:
  • id – next available unique ID for wx events
  • parent – parent window
post_init()

Post initialization call back to close the loose ends

remove_plot(group_id, id)

remove plot of ID = id from a panel of group ID =group_id

set_batch_selection(flag)

the plugin to its batch state if flag is True

set_data(data_list=None)

receive a list of data and use it in the current perspective

set_default_perspective()

Call back method that True to notify the parent that the current plug-in can be set as default perspective. when returning False, the plug-in is not candidate for an automatic default perspective setting

set_is_active(active=False)
set_panel_on_focus(panel)
set_state(state=None, datainfo=None)

update state

set_theory(theory_list=None)
Parameters:theory_list – list of information related to available theory state
update_panel(data, panel)

update the graph of a given panel

use_data()

return True if these plugin use data

Table Of Contents

Previous topic

Plotter2D

Next topic

profile_dialog

This Page