181,8 → 181,7 |
self.TestListCtrl.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnTestSelected, self.TestListCtrl) |
|
# Configure Graph |
self.client = wx.lib.plot.PlotCanvas(self.GraphPanel, size=(800,300)) |
|
self.client = wx.lib.plot.PlotCanvas(self.GraphPanel) |
self.client.SetPointLabelFunc(self.DrawPointLabel) |
|
self.client.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL)) |
189,7 → 188,18 |
self.client.SetFontSizeAxis(10) |
self.client.SetFontSizeLegend(7) |
self.client.setLogScale((False,False)) |
self.client.SetXSpec('auto') |
self.client.SetYSpec('auto') |
|
data1 = 2.*_Numeric.pi*_Numeric.arange(200)/200. |
data1.shape = (100, 2) |
data1[:,1] = _Numeric.sin(data1[:,0]) |
markers1 = wx.lib.plot.PolyMarker(data1, legend='Green Markers', colour='green', marker='circle',size=1) |
pi = 3.1415 |
markers2 = wx.lib.plot.PolyMarker([(0., 0.), (pi/4., 1.), (pi/2, 0.), |
(3.*pi/4., -1)], legend='Cross Legend', colour='blue', |
marker='cross') |
#self.client.Draw(wx.lib.plot.PlotGraphics([markers1,markers2],"Graph Title", "X Axis", "Y Axis")) |
|
# Configure TestListCtrl |
self.TestListCtrl.InsertColumn(0, "Name") |
230,12 → 240,12 |
nb = vibTest.getDataLen() |
y = int(self.yAxesChoice.GetStringSelection()) |
|
#self.client.Clear() |
xydata = _Numeric.linspace(0,0.09*nb,2*nb) |
self.client.Clear() |
xydata = _Numeric.arange(nb*2) |
xydata.shape = (nb, 2) |
xydata[:,1] = vibTest.getRawData() |
line = wx.lib.plot.PolyLine(xydata, legend= 'Raw Data', colour='red') |
self.client.Draw(wx.lib.plot.PlotGraphics([line],"Graph Title", "Time (ms)", "Acc"), yAxis= (-y,y)) |
self.client.Draw(wx.lib.plot.PlotGraphics([line],"Graph Title", "Time", "Acc"), yAxis= (-y,y)) |
self.client.SetEnableGrid('Horizontal') |
|
|