@header@
 
 
matplotlib.backends.backend_fltkagg
index
/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_fltkagg.py

A backend for FLTK
 
Copyright: Gregory Lielens, Free Field Technologies SA and
           John D. Hunter 2004
 
This code is released under the matplotlib license

 
Modules
       
fltk
math
matplotlib
os
sys
thread
time
matplotlib.windowing

 
Classes
       
AxisMenu
FLTKButton
matplotlib.backends.backend_agg.FigureCanvasAgg(matplotlib.backend_bases.FigureCanvasBase)
FigureCanvasFltkAgg
matplotlib.backend_bases.FigureManagerBase
FigureManagerFltkAgg
FigureManagerFltkAgg
fltk.Fl_Widget(fltk.Fl_WidgetBase)
FltkCanvas
NavigationToolbar
matplotlib.backend_bases.NavigationToolbar2
NavigationToolbar2FltkAgg

 
class AxisMenu
     Methods defined here:
__init__(self, toolbar)
adjust(self, naxes)
get_indices(self)
widget(self)

 
class FLTKButton
     Methods defined here:
__init__(self, text, file, command, argument, type='classic')
widget(self)

 
class FigureCanvasFltkAgg(matplotlib.backends.backend_agg.FigureCanvasAgg)
    
Method resolution order:
FigureCanvasFltkAgg
matplotlib.backends.backend_agg.FigureCanvasAgg
matplotlib.backend_bases.FigureCanvasBase

Methods defined here:
__init__(self, figure)
draw(self)
print_figure(self, filename, dpi=150, facecolor='w', edgecolor='w', orientation='portrait')
resize(self, size)
show = draw(self)
widget(self)

Methods inherited from matplotlib.backends.backend_agg.FigureCanvasAgg:
buffer_rgba(self)
get_renderer(self)
tostring_argb(self)
tostring_rgb(self)

Methods inherited from matplotlib.backend_bases.FigureCanvasBase:
button_press_event(self, x, y, button, guiEvent=None)
Backend derived classes should call this function on any mouse
button press.  x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
button_release_event(self, x, y, button, guiEvent=None)
Backend derived classes should call this function on any mouse
button release.  x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
draw_cursor(self, event)
Draw a cursor in the event.axes if inaxes is not None.  Use
native GUI drawing for efficiency if possible
draw_idle(self, *args, **kwargs)
draw only if idle; defaults to draw but backends can overrride
key_press_event(self, key, guiEvent=None)
key_release_event(self, key, guiEvent=None)
motion_notify_event(self, x, y, guiEvent=None)
Backend derived classes should call this function on any mouse
button release.  x,y are the canvas coords: 0,0 is lower, left.
button and key are as defined in MouseEvent
mpl_connect(self, s, func)
Connect event with string s to func.  The signature of func is
 
  def func(event)
 
where event is a MplEvent.  The following events are recognized
 
 'key_press_event' 
 'button_press_event' 
 'button_release_event' 
 'motion_notify_event' 
 
 For the three events above, if the mouse is over the axes,
 the variable event.inaxes will be set to the axes it is over,
 and additionally, the variables event.xdata and event.ydata
 will be defined.  This is the mouse location in data coords.
 See backend_bases.MplEvent.
 
return value is a connection id that can be used with
mpl_disconnect
mpl_disconnect(self, cid)
Connect s to func. return an id that can be used with disconnect
Method should return None
switch_backends(self, FigureCanvasClass)
instantiate an instance of FigureCanvasClass
 
This is used for backend switching, eg, to instantiate a
FigureCanvasPS from a FigureCanvasGTK.  Note, deep copying is
not done, so any changes to one of the instances (eg, setting
figure size or line props), will be reflected in the other

Data and other attributes inherited from matplotlib.backend_bases.FigureCanvasBase:
events = ('key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'motion_notify_event')

 
FigureManager = class FigureManagerFltkAgg(matplotlib.backend_bases.FigureManagerBase)
    Public attributes
 
canvas      : The FigureCanvas instance
num         : The Figure number
toolbar     : The fltk.Toolbar
window      : The fltk.Window
 
  Methods defined here:
__init__(self, canvas, num, window)
resize(self, event)
show(self)

Methods inherited from matplotlib.backend_bases.FigureManagerBase:
destroy(self)
key_press(self, event)
show_popup(self, msg)
Display message in a popup -- GUI only

 
class FigureManagerFltkAgg(matplotlib.backend_bases.FigureManagerBase)
    Public attributes
 
canvas      : The FigureCanvas instance
num         : The Figure number
toolbar     : The fltk.Toolbar
window      : The fltk.Window
 
  Methods defined here:
__init__(self, canvas, num, window)
resize(self, event)
show(self)

Methods inherited from matplotlib.backend_bases.FigureManagerBase:
destroy(self)
key_press(self, event)
show_popup(self, msg)
Display message in a popup -- GUI only

 
class FltkCanvas(fltk.Fl_Widget)
    
Method resolution order:
FltkCanvas
fltk.Fl_Widget
fltk.Fl_WidgetBase
__builtin__.object

Methods defined here:
__init__(self, x, y, w, h, l, source)
draw(self)
handle(self, event)

Methods inherited from fltk.Fl_Widget:
__del__(self, destroy=<built-in function delete_Fl_Widget>)
__repr__(self)
registerSelf(*args)

Methods inherited from fltk.Fl_WidgetBase:
activate(*args)
active(*args)
active_r(*args)
align(*args)
argument(*args)
box(*args)
callback = __Fl_WidgetCallback(self, *args)
changed(*args)
clear_changed(*args)
clear_damage(*args)
clear_output(*args)
clear_visible(*args)
clear_visible_focus(*args)
color(*args)
color2(*args)
contains(*args)
damage(*args)
damage_resize(*args)
deactivate(*args)
deimage(*args)
do_callback(*args)
draw_label(*args)
h(*args)
hide(*args)
image(*args)
inside(*args)
label(*args)
labelcolor(*args)
labelfont(*args)
labelsize(*args)
labeltype(*args)
measure_label(*args)
output(*args)
parent(*args)
position(*args)
redraw(*args)
redraw_label(*args)
resize(*args)
selection_color(*args)
set_changed(*args)
set_output(*args)
set_visible(*args)
set_visible_focus(*args)
show(*args)
size(*args)
take_focus(*args)
takesevents(*args)
tooltip(*args)
type(*args)
user_data(*args)
visible(*args)
visible_focus(*args)
visible_r(*args)
w(*args)
when(*args)
window(*args)
x(*args)
y(*args)

Static methods inherited from fltk.Fl_WidgetBase:
default_callback = Fl_WidgetBase_default_callback(...)
test_shortcut = Fl_WidgetBase_test_shortcut(...)

Data and other attributes inherited from fltk.Fl_WidgetBase:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Fl_WidgetBase' objects>
list of weak references to the object (if defined)

 
class NavigationToolbar
    Public attriubutes
 
  canvas   - the FigureCanvas  (FigureCanvasFltkAgg = customised fltk.Widget)
 
  Methods defined here:
__init__(self, canvas, figman)
close(self)
set_active(self, ind)
update(self)
widget(self)

 
class NavigationToolbar2FltkAgg(matplotlib.backend_bases.NavigationToolbar2)
    Public attriubutes
 
  canvas   - the FigureCanvas  
  figman   - the Figure manager
 
  Methods defined here:
__init__(self, canvas, figman)
close(self)
dynamic_update(self)
pan(self, *args)
set_active(self, ind)
set_cursor(self, cursor)
set_message(self, s)
update(self)
widget(self)
zoom(self, *args)

Methods inherited from matplotlib.backend_bases.NavigationToolbar2:
back(self, *args)
move back up the view lim stack
drag_pan(self, event)
the drag callback in pan/zoom mode
draw(self)
redraw the canvases, update the locators
draw_rubberband(self, event, x0, y0, x1, y1)
draw a rectangle rubberband to indicate zoom limits
forward(self, *args)
move forward in the view lim stack
home(self, *args)
restore the original view
mouse_move(self, event)
press(self, event)
this will be called whenver a mouse button is pressed
press_pan(self, event)
the press mouse button in pan/zoom mode callback
press_zoom(self, event)
the press mouse button in zoom to rect mode callback
push_current(self)
push the current view limits onto the stack
release(self, event)
this will be called whenever mouse button is released
release_pan(self, event)
the release mouse button callback in pan/zoom mode
release_zoom(self, event)
the release mouse button callback in zoom to rect mode
save_figure(self, *args)
save the current figure

 
Functions
       
Fltk_run_interactive()
destroy_figure(ptr, figman)
draw_if_interactive()
error_msg_fltk(msg, parent=None)
invert_all(ptr, amenu)
new_figure_manager(num, *args, **kwargs)
Create a new figure manager instance
pan(ptr, arg)
save_figure(ptr, base)
select_all(ptr, amenu)
set_active(ptr, amenu)
show(mainloop=False)
Show all the figures and enter the fltk mainloop
 
This should be the last line of your script
zoom(ptr, arg)

 
Data
        Fl_running = <thread.lock object>
PIXELS_PER_INCH = 75
cursord = {0: 31, 1: 35, 2: 66, 3: 27}
cursors = <matplotlib.backend_bases.Cursors instance>
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
rcParams = {'axes.edgecolor': 'black', 'axes.facecolor': 'white', 'axes.grid': False, 'axes.hold': True, 'axes.labelcolor': 'black', 'axes.labelsize': 12.0, 'axes.linewidth': 1.0, 'axes.titlesize': 14.0, 'backend': 'WXAgg', 'datapath': '/usr/local/share/matplotlib', ...}
special_key = {65505: 'shift', 65506: 'shift', 65507: 'control', 65508: 'control', 65515: 'win', 65516: 'win'}
verbose = <matplotlib.Verbose instance>
@footer@