PyPlot relative questions

As the image show, an OPC IO recording tool is created with
wx.lib.plot.PlotCanvas.
<http://wxpython-users.1045709.n5.nabble.com/file/n5719833/2014-01-15_151009.png>

After the first rough version is created but remain two problems.
1. The point label couldn't be added. I have set enable point label to true
add set a point label function, but it seems that the function is never
called when the mouse pointer hover the data point.

        self.canvas = cvs= wxp.PlotCanvas(pn)
        cvs.SetEnableDrag(True)
        cvs.SetEnableLegend(True)
        cvs.SetEnableZoom(True)
        cvs.SetEnablePointLabel(True)
        cvs.SetPointLabelFunc(self.OnMouseOverCanvasPoint)

The document of SetPointLabelFunc is a few words at doc
<http://wxpython.org/Phoenix/docs/html/lib.plot.PlotCanvas.html?highlight=plot#lib.plot.PlotCanvas.Draw>

SetPointLabelFunc(self, func)
Sets the function with custom code for pointLabel drawing **** more info
needed ***********

Did I misuse something?
2. When enable zoom, if drag a rectangle outside the canvas range make
trigger exception but this is not happen in the PyPlot demo program in wx
2.9.

<http://wxpython-users.1045709.n5.nabble.com/file/n5719833/2014-01-15_152543.png>

3. Is it possible to add a content menu with the PlotCanvas ctrl. Do I need
to overwrite the original mouse right down method? Currently it not work
with bind the right click event to the PlotCanvas.

Any suggestions will be appreciated. Thanks in advance!

···

-----
I become to love to write program ever since got in university. The programming languages I have learned from collage lessons are C and Assembly. My interest drive me to learn all the other things. Currently I'm working at Ideal Energy (http://www.idealenergy.com) as a software developer.
My undergraduate degree is Electrical Engineering and Automation. Graduate degree is Power Electronics and Power Drives. Personal favorite programming languages are C, C++, C# and Python.
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/PyPlot-relative-questions-tp5719833.html
Sent from the wxPython-users mailing list archive at Nabble.com.

Erxin wrote:

As the image show, an OPC IO recording tool is created with
wx.lib.plot.PlotCanvas.
<http://wxpython-users.1045709.n5.nabble.com/file/n5719833/2014-01-15_151009.png&gt;

After the first rough version is created but remain two problems.
1. The point label couldn't be added. I have set enable point label to true
add set a point label function, but it seems that the function is never
called when the mouse pointer hover the data point.

         self.canvas = cvs= wxp.PlotCanvas(pn)
         cvs.SetEnableDrag(True)
         cvs.SetEnableLegend(True)
         cvs.SetEnableZoom(True)
         cvs.SetEnablePointLabel(True)
         cvs.SetPointLabelFunc(self.OnMouseOverCanvasPoint)

The document of SetPointLabelFunc is a few words at doc
<http://wxpython.org/Phoenix/docs/html/lib.plot.PlotCanvas.html?highlight=plot#lib.plot.PlotCanvas.Draw&gt;

SetPointLabelFunc(self, func)
Sets the function with custom code for pointLabel drawing **** more info
needed ***********

Did I misuse something?
2. When enable zoom, if drag a rectangle outside the canvas range make
trigger exception but this is not happen in the PyPlot demo program in wx
2.9.

<http://wxpython-users.1045709.n5.nabble.com/file/n5719833/2014-01-15_152543.png&gt;

3. Is it possible to add a content menu with the PlotCanvas ctrl. Do I need
to overwrite the original mouse right down method? Currently it not work
with bind the right click event to the PlotCanvas.

Any suggestions will be appreciated. Thanks in advance!

Please make a runnable, small as possible, sample application that
demonstrates the problem, and let us know the platform and wx version.
http://wiki.wxpython.org/MakingSampleApps

···

--
Robin Dunn
Software Craftsman

OK, I will write a sample application when I have some free time. Thanks
again.

···

-----
I become to love to write program ever since got in university. The programming languages I have learned from collage lessons are C and Assembly. My interest drive me to learn all the other things. Currently I'm working at Ideal Energy (http://www.idealenergy.com) as a software developer.
My undergraduate degree is Electrical Engineering and Automation. Graduate degree is Power Electronics and Power Drives. Personal favorite programming languages are C, C++, C# and Python.
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/PyPlot-relative-questions-tp5719833p5719873.html
Sent from the wxPython-users mailing list archive at Nabble.com.