Table Of Contents

Previous topic

plugins Package

This Page

avoplot_fromfile_plugin Package

avoplot_fromfile_plugin Package

column_selector Module

This module is pretty messy - it is still very much under active development and will likely be changed a lot in the near future - don’t depend on any of the functionality currently defined!

class avoplot.plugins.avoplot_fromfile_plugin.column_selector.ColumnDataPanel(parent, file_contents)

Bases: wx._windows.ScrolledWindow

enable_select_mode(val, data_series)
get_selection()

Returns a tuple (selection string, col_idx, data mask) where selection string is a human readable string of the selection made, col_idx is the index of the column that the mask relates to and data mask is a numpy mask array where True indicates a selection and False indicates a value to mask out.

on_change_col_dtype(evnt)
on_column_resize(evnt)

Handle column resize events - this requires all the data_type choices to be resized to match the columns

set_editable(value)
class avoplot.plugins.avoplot_fromfile_plugin.column_selector.DataSeriesSelectPanel(parent, main_frame, file_contents)

Bases: wx._windows.ScrolledWindow

enable_select_mode(val, series)
on_add_data_series(evnt)
on_remove_data_series(evnt)
class avoplot.plugins.avoplot_fromfile_plugin.column_selector.DataSeriesSelectPanelContainer(parent, main_frame, file_contents)

Bases: wx._windows.SashWindow

class avoplot.plugins.avoplot_fromfile_plugin.column_selector.FileContentsPanel(parent, file_contents)

Bases: wx._windows.Panel

enable_select_mode(val, data_series)
on_cols_chkbox(evnt)
on_expand(evnt)
on_rows_chkbox(evnt)
exception avoplot.plugins.avoplot_fromfile_plugin.column_selector.InvalidSelectionError

Bases: exceptions.ValueError

class avoplot.plugins.avoplot_fromfile_plugin.column_selector.TxtFileDataSeriesSelectFrame(parent, file_contents)

Bases: wx._windows.Dialog

enable_select_mode(val, data_series)
get_series()
on_cancel(evnt)
on_plot(evnt)
class avoplot.plugins.avoplot_fromfile_plugin.column_selector.XYDataSeriesPanel(parent, file_contents, main_frame)

Bases: wx._windows.Panel

enable_select_mode(val, series)
get_add_button_id()
get_remove_button_id()
get_series_data()

Returns a tuple of (xdata, ydata)

get_x_series_data()
get_y_series_data()
on_select_x_series(evnt)
on_select_y_series(evnt)
plot_into_axes(axes)
set_button_visibility(add_button, remove_button)
set_selection(selection_str)
validate_selection(row_selection)

loader Module

class avoplot.plugins.avoplot_fromfile_plugin.loader.ColumnData(raw_data, title='')
get_data()
get_data_mask()
get_data_type()
get_number_of_rows()
set_data_type(dtype)
class avoplot.plugins.avoplot_fromfile_plugin.loader.FileContents(filename, columns, header=None, comment_symbols=[], skipped_rows=[], footer=None)
get_col_name(n)
get_column_by_index(idx)
get_column_by_name(name)
get_columns()
get_number_of_columns()
get_number_of_rows()
print_summary()
class avoplot.plugins.avoplot_fromfile_plugin.loader.FileLoaderBase
load(filename, ifp)
test(filename, ifp)
exception avoplot.plugins.avoplot_fromfile_plugin.loader.InvalidDataTypeError

Bases: exceptions.TypeError

avoplot.plugins.avoplot_fromfile_plugin.loader.load_file(filename)
avoplot.plugins.avoplot_fromfile_plugin.loader.register_loader(loader_instance)
avoplot.plugins.avoplot_fromfile_plugin.loader.to_float(data)
avoplot.plugins.avoplot_fromfile_plugin.loader.to_str(data)

txt_file_loader Module

class avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.TextFileLoader

Bases: avoplot.plugins.avoplot_fromfile_plugin.loader.FileLoaderBase

get_columns(ifp, n_cols, start_idx, end_idx, lines_to_skip, headings)
guess_column_titles(ifp, n_cols, start_idx, comment_symbol)
guess_comment_symbol(ifp)
guess_data_lines(ifp, n_cols, comment=None)
guess_number_of_columns(ifp)
load(filename, ifp)
test(filename, ifp)
class avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.TextFilePlugin

Bases: avoplot.plugins.AvoPlotPluginSimple

get_data_series()
plot_into_subplot(subplot)
avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.is_binary(ifp)

Return true if the given filename is binary. This is done based on finding null bytes in the file - it will only be used when python-magic is not available.

avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.load(filename)
avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.multi_sort(*lists)

Sorts multiple lists based on the contents of the first list. >>> print multi_sort([3,2,1],[‘a’,’b’,’c’],[‘d’,’e’,’f’]) ([1, 2, 3], [‘c’, ‘b’, ‘a’], [‘f’, ‘e’, ‘d’]) >>> print multi_sort([3,2,1]) ([1, 2, 3],)

avoplot.plugins.avoplot_fromfile_plugin.txt_file_loader.tuple_compare(first, second, element=0)

Compares two tuples based on their values at the index given by element. Use functools.partial() to build comparators for any element value for use in sort() functions. >>> print tuple_compare((1,2),(1,2)) 0 >>> print tuple_compare((1,2),(2,1)) -1 >>> print tuple_compare((1,2),(2,1),element=1) 1