Logo Search packages:      
Sourcecode: matplotlib version File versions

mpl_toolkits::gtktools Namespace Reference


Detailed Description


Some gtk specific tools and widgets

   * rec2gtk          : put record array in GTK treeview - requires gtk

Example usage

    import matplotlib.mlab as mlab
    import mpl_toolkits.gtktools as gtktools

    r = mlab.csv2rec('somefile.csv', checkrows=0)

    formatd = dict(
weight = mlab.FormatFloat(2),
change = mlab.FormatPercent(2),
cost   = mlab.FormatThousands(2),
)


    exceltools.rec2excel(r, 'test.xls', formatd=formatd)
    mlab.rec2csv(r, 'test.csv', formatd=formatd)


    import gtk
    scroll = gtktools.rec2gtk(r, formatd=formatd)
    win = gtk.Window()
    win.set_size_request(600,800)
    win.add(scroll)
    win.show_all()
    gtk.main()


Classes

class  RecListStore
class  RecTreeView
class  SortedStringsScrolledWindow

Functions

def edit_recarray
def error_message
def gtkformat_factory
def mycallback
def rec2gtk
def simple_message

Variables

tuple clientid = range(N)
list constant = ['clientid']
list dates = [today+datetime.timedelta(days=i) for i in range(N)]
tuple formatd = mlab.get_formatd(r)
tuple gains = np.random.randn(N)
tuple liststore = RecListStore(r, formatd=formatd, stringd=stringd)
int N = 10
tuple prices = np.random.rand(N)
tuple r
tuple r2 = r.copy()
tuple stringd = dict(weekdays=['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])
tuple today = datetime.date.today()
tuple treeview = RecTreeView(liststore, constant=constant)
int up = 0
list weekdays = [d.strftime('%a') for d in dates]
tuple win = gtk.Window()


Generated by  Doxygen 1.6.0   Back to index