On Fri, Jun 24, 2011 at 9:56 AM, Benjamin Root <ben.r...@ou.edu> wrote:
> Hello again,
>
> I am trying to figure out a regression in mplot3d code where the plot's
> ability to rotate and zoom are severely hindered. I want to do some
> profiling comparisons, but I need identical runs to do this. I know I
> probably could figure out how to properly simulate the motion of a mouse and
> button presses through the callback system, but I wanted to first see if
> anybody else has done anything like this.
>
> Thanks,
> Ben Root
>
Solved. I figured out how to use ldtp and use it to interact with an
example script. For future reference, I am attaching a script that
demonstrates this usage.
I hope it helps someone in the future! (Maybe we might even want to
consider it as an option to turn on in our test suite for a full test
system?).
Ben Root
import numpy as np
import ldtp
#ldtp.launchapp('python', ['-m', 'cProfile', '-o', 'mpl3d_good.profile', 'hist3d_demo.py'])
ldtp.launchapp('python', ['hist3d_demo.py'])
winName = '*Figure*'
if not ldtp.waittillguiexist(winName) :
print "Figure didn't open in time..."
exit()
x, y, wdth, hgt = ldtp.getwindowsize(winName)
startx = x + int(wdth // 3)
starty = y + int(hgt // 3)
mousex = startx + np.cumsum([1]*50)
mousey = starty + np.cumsum([1]*50)
ldtp.generatemouseevent(startx, starty, 'b1p')
lastx, lasty = startx, starty
for destx, desty in zip(mousex, mousey) :
ldtp.generatemouseevent(int(destx), int(desty), 'abs')
ldtp.wait(0.25)
lastx, lasty = int(destx), int(desty)
ldtp.generatemouseevent(lastx, lasty, 'b1r')
ldtp.closewindow(winName)
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense..
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel