This commit was manufactured by cvs2svn to create tag 'WX_2_8_3'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_8_3@44921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2007-03-19 12:50:38 +00:00
parent 0d3847e80c
commit ddae8107b7
440 changed files with 11219 additions and 10751 deletions

View File

@@ -567,6 +567,8 @@ class PlotCanvas(wx.Panel):
self._pointLabelFunc= None
self.canvas.Bind(wx.EVT_LEAVE_WINDOW, self.OnLeave)
self._useScientificNotation = False
self.canvas.Bind(wx.EVT_PAINT, self.OnPaint)
self.canvas.Bind(wx.EVT_SIZE, self.OnSize)
# OnSize called to make sure the buffer is initialized.
@@ -746,6 +748,12 @@ class PlotCanvas(wx.Panel):
"""Set True to show scrollbars"""
return self.sb_vert.IsShown()
def SetUseScientificNotation(self, useScientificNotation):
self._useScientificNotation = useScientificNotation
def GetUseScientificNotation(self):
return self._useScientificNotation
def SetEnableDrag(self, value):
"""Set True to enable drag."""
if value not in [True,False]:
@@ -1565,7 +1573,7 @@ class PlotCanvas(wx.Panel):
error = e
factor = f
grid = factor * 10.**power
if power > 4 or power < -4:
if self._useScientificNotation and (power > 4 or power < -4):
format = '%+7.1e'
elif power >= 0:
digits = max(1, int(power))