Home | Trees | Index | Help |
|
---|
Package wx :: Package lib :: Module plot :: Class PlotCanvas |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ | PlotCanvas
Method Summary | |
---|---|
Constucts a window, which can be a child of a frame, dialog or any other non-control window | |
Erase the window. | |
Draw objects in graphics with specified x and y axis. | |
Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for each curve. | |
Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. | |
True if grid enabled. | |
True if Legend enabled. | |
True if pointLabel enabled. | |
True if zooming enabled. | |
Get current tick and axis label font size in points | |
Get current Legend font size in points | |
Get current Title font size in points | |
Returns pointLabel Drawing Function | |
Returns (minX, maxX) x-axis for currently displayed portion of graph | |
Returns (minX, maxX) x-axis range for displayed graph | |
Returns current XSpec for axis | |
Takes a mouse event and returns the XY user axis values. | |
Returns (minY, maxY) y-axis for currently displayed portion of graph | |
Returns (minY, maxY) y-axis range for displayed graph | |
Returns current YSpec for axis | |
Used to erase pointLabel when mouse outside window | |
OnMotion(self,
event)
| |
OnMouseDoubleClick(self,
event)
| |
OnMouseLeftDown(self,
event)
| |
OnMouseLeftUp(self,
event)
| |
OnMouseRightDown(self,
event)
| |
OnPaint(self,
event)
| |
OnSize(self,
event)
| |
Brings up the page setup dialog | |
Converts Screen position to User Coordinates | |
Converts User position to Screen Coordinates | |
Print current plot. | |
Print-preview current plot. | |
Redraw the existing plot. | |
Unzoom the plot. | |
Saves the file to the type specified in the extension. | |
Move view right number of axis units. | |
Move view up number of axis units. | |
Set True to enable grid. | |
Set True to enable legend. | |
Set True to enable pointLabel. | |
Set True to enable zooming. | |
Set the tick and axis label font size (default is 10 point) | |
Set Legend font size (default is 7 point) | |
Set Title font size (default is 15 point) | |
Sets the function with custom code for pointLabel drawing **** more info needed *********** | |
xSpec- defines x axis type. | |
ySpec- defines x axis type. | |
Updates the pointLabel point on screen with data contained in mDataDict. | |
Zoom on the plot Centers on the X,Y coords given in Center Zooms by the Ratio = (Xratio, Yratio) given |
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
pos=wx.Point(-1, -1),
size=wx.Size(-1, -1),
style=541072960,
name='')
Constucts a window, which can be a child of a frame, dialog or
any other non-control window |
Clear(self)Erase the window. |
Draw(self, graphics, xAxis=None, yAxis=None, dc=None)Draw objects in graphics with specified x and y axis. graphics- instance of PlotGraphics with list of PolyXXX objects xAxis - tuple with (min, max) axis range to view yAxis - same as xAxis dc - drawing context - doesn't have to be specified. If it's not, the offscreen buffer is used |
GetClosestPoints(self, pntXY, pointScaled=True)Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for each curve. Returns [] if no curves are being plotted. x, y in user coords if pointScaled == True based on screen coords if pointScaled == False based on user coords |
GetClosetPoint(self, pntXY, pointScaled=True)Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. Returns [] if no curves are being plotted. x, y in user coords if pointScaled == True based on screen coords if pointScaled == False based on user coords |
GetEnableGrid(self)True if grid enabled. |
GetEnableLegend(self)True if Legend enabled. |
GetEnablePointLabel(self)True if pointLabel enabled. |
GetEnableZoom(self)True if zooming enabled. |
GetFontSizeAxis(self)Get current tick and axis label font size in points |
GetFontSizeLegend(self)Get current Legend font size in points |
GetFontSizeTitle(self)Get current Title font size in points |
GetPointLabelFunc(self)Returns pointLabel Drawing Function |
GetXCurrentRange(self)Returns (minX, maxX) x-axis for currently displayed portion of graph |
GetXMaxRange(self)Returns (minX, maxX) x-axis range for displayed graph |
GetXSpec(self)Returns current XSpec for axis |
GetXY(self, event)Takes a mouse event and returns the XY user axis values. |
GetYCurrentRange(self)Returns (minY, maxY) y-axis for currently displayed portion of graph |
GetYMaxRange(self)Returns (minY, maxY) y-axis range for displayed graph |
GetYSpec(self)Returns current YSpec for axis |
OnLeave(self, event)Used to erase pointLabel when mouse outside window |
PageSetup(self)Brings up the page setup dialog |
PositionScreenToUser(self, pntXY)Converts Screen position to User Coordinates |
PositionUserToScreen(self, pntXY)Converts User position to Screen Coordinates |
Printout(self, paper=None)Print current plot. |
PrintPreview(self)Print-preview current plot. |
Redraw(self, dc=None)Redraw the existing plot. |
Reset(self)Unzoom the plot. |
SaveFile(self, fileName='')Saves the file to the type specified in the extension. If no file name is specified a dialog box is provided. Returns True if sucessful, otherwise False. .bmp Save a Windows bitmap file. .xbm Save an X bitmap file. .xpm Save an XPM bitmap file. .png Save a Portable Network Graphics file. .jpg Save a Joint Photographic Experts Group file. |
ScrollRight(self, units)Move view right number of axis units. |
ScrollUp(self, units)Move view up number of axis units. |
SetEnableGrid(self, value)Set True to enable grid. |
SetEnableLegend(self, value)Set True to enable legend. |
SetEnablePointLabel(self, value)Set True to enable pointLabel. |
SetEnableZoom(self, value)Set True to enable zooming. |
SetFontSizeAxis(self, point=10)Set the tick and axis label font size (default is 10 point) |
SetFontSizeLegend(self, point=7)Set Legend font size (default is 7 point) |
SetFontSizeTitle(self, point=15)Set Title font size (default is 15 point) |
SetPointLabelFunc(self, func)Sets the function with custom code for pointLabel drawing **** more info needed *********** |
SetXSpec(self, type='auto')xSpec- defines x axis type. Can be 'none', 'min' or 'auto' where: 'none' - shows no axis or tick mark values 'min' - shows min bounding box values 'auto' - rounds axis range to sensible values |
SetYSpec(self, type='auto')ySpec- defines x axis type. Can be 'none', 'min' or 'auto' where: 'none' - shows no axis or tick mark values 'min' - shows min bounding box values 'auto' - rounds axis range to sensible values |
UpdatePointLabel(self, mDataDict)Updates the pointLabel point on screen with data contained in mDataDict. mDataDict will be passed to your function set by SetPointLabelFunc. It can contain anything you want to display on the screen at the scaledXY point you specify. This function can be called from parent window with onClick, onMotion events etc. |
Zoom(self, Center, Ratio)Zoom on the plot Centers on the X,Y coords given in Center Zooms by the Ratio = (Xratio, Yratio) given |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:24:53 2005 | http://epydoc.sf.net |