Package diffpy :: Package pdfgui :: Package gui :: Module extendedplotframe :: Class ExtendedPlotFrame
[hide private]
[frames] | no frames]

Class ExtendedPlotFrame

source code

     object --+                    
              |                    
wx._core.Object --+                
                  |                
wx._core.EvtHandler --+            
                      |            
        wx._core.Window --+        
                          |        
 wx._windows.TopLevelWindow --+    
                              |    
              wx._windows.Frame --+
                                  |
                                 ExtendedPlotFrame

An extended plotting frame with a save and close button.

The class has a matplotlib.figure.Figure data member named 'figure'.
It also has a matplotlib.axes.Axes data member named 'axes'.
The normal matplotlib plot manipulations can be performed with these two
data members. See the matplotlib API at:
http://matplotlib.sourceforge.net/classdocs.html



Instance Methods [hide private]
 
__init__(self, parent=None, *args, **kwargs)
Initialize the CanvasFrame.
source code
 
onClose(self, evt)
Close the frame.
source code
 
OnPaint(self, event) source code
 
savePlotData(self, evt)
Save the data in the plot in columns.
source code
 
onPrint(self, evt)
handle print event
source code
 
onPrintSetup(self, event=None) source code
 
onPrintPreview(self, event=None) source code
 
UpdateStatusBar(self, event) source code
 
replot(self)
officially call function in matplotlib to do drawing...
source code
 
insertCurve(self, xData, yData, style)
insert a new curve to the plot...
source code
 
updateData(self, curveRef, xData, yData)
update data for a existing curve...
source code
 
changeStyle(self, curveRef, style)
change curve style...
source code
 
removeCurve(self, curveRef)
remove curve from plot...
source code
 
__updateViewLimits(self)
adjust the subplot range in order to show all curves correctly.
source code
 
__translateStyles(self, style)
Private function to translate general probabilities to...
source code
 
setTitle(self, wt, gt)
set graph labels...
source code
 
setXLabel(self, x)
set label for x axis...
source code
 
setYLabel(self, y)
set label for y axis...
source code
 
clear(self)
erase all curves
source code

Inherited from wx._windows.Frame: Command, Create, CreateStatusBar, CreateToolBar, DoGiveHelp, DoMenuUpdates, GetMenuBar, GetStatusBar, GetStatusBarPane, GetToolBar, PopStatusText, ProcessCommand, PushStatusText, SendSizeEvent, SetMenuBar, SetStatusBar, SetStatusBarPane, SetStatusText, SetStatusWidths, SetToolBar

Inherited from wx._windows.TopLevelWindow: CenterOnScreen, CentreOnScreen, EnableCloseButton, GetDefaultItem, GetIcon, GetTitle, GetTmpDefaultItem, Iconize, IsActive, IsAlwaysMaximized, IsFullScreen, IsIconized, IsMaximized, MacGetMetalAppearance, MacGetUnifiedAppearance, MacSetMetalAppearance, Maximize, RequestUserAttention, Restore, SetDefaultItem, SetIcon, SetIcons, SetShape, SetTitle, SetTmpDefaultItem, ShowFullScreen, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from wx._windows.Frame: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx._windows.Frame: MenuBar, StatusBar, StatusBarPane, ToolBar, thisown

Inherited from wx._windows.TopLevelWindow: DefaultItem, Icon, Title, TmpDefaultItem

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None, *args, **kwargs)
(Constructor)

source code 
Initialize the CanvasFrame.

The frame uses ExtendedToolbar as a toolbar, which has a save data
button and a close button on the toolbar in addition to the normal
buttons.

args -- argument list
kwargs -- keyword argument list

Overrides: wx._windows.Frame.__init__

replot(self)

source code 
officially call function in matplotlib to do drawing
        

insertCurve(self, xData, yData, style)

source code 
insert a new curve to the plot

xData, yData -- x, y data to used for the curve
style -- the way curve should be plotted
return:  internal reference to the newly added curve

updateData(self, curveRef, xData, yData)

source code 
update data for a existing curve

curveRef -- internal reference to a curve
xData, yData -- x, y data to used for the curve

changeStyle(self, curveRef, style)

source code 
change curve style

curveRef -- internal reference to curves
style -- style dictionary

removeCurve(self, curveRef)

source code 
remove curve from plot

curveRef -- internal reference to curves

__translateStyles(self, style)

source code 
Private function to translate general probabilities to
Matplotlib specific ones

style -- general curve style dictionary (defined in demoplot)

setTitle(self, wt, gt)

source code 
set graph labels

wt -- window title
gt -- graph title

setXLabel(self, x)

source code 
set label for x axis

x -- x label

setYLabel(self, y)

source code 
set label for y axis

y -- y label