<html><head><base href="http://paste.debian.net/plain/106891"></head><body style="-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><base href="http://paste.debian.net/plain/106891"><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">hello All
<br></span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">have you never tried to embed a matplotlib 3d graph inside pyqt ?</span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">
i'm tring to do it .. but i've problenms to refresh my plot.</span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">
The 3d data are displayed ok inside a pyqt simple widget, </span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">but if i try to redraw the image (re-call the on_draw function) ... </span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">i have it overlay the previouse one.</span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">If i add "clear()" at begin of my "on_draw" action, </span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">the plot is update correctly ... and each "on_draw" action give me the correct results ... </span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">but then i'm no more able to move the 3d plot view (but i can only zoom in/out the scene)</span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"></span></font><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">the code i'm using is : <a href="http://paste.debian.net/106890">http://paste.debian.net/106890</a></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "></span><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">at line 22 there is a "def erase(self):" function</span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">if i connect it to the plot i have the image is correctly redraw .. but then i lost the 3d actions </span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">can you give it a try ?</span></font></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><br></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"></span></font><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">seems thast the "clear()" action broke something ... thanks a lot for any help</span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "></span><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">to try it .. i've upload the .mat file (just few kbytes)</span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "></span><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">it is available at : </span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><br></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><a href="http://www.geofemengineering.it/data/complexity_depth_grid1.mat">http://www.geofemengineering.it/data/complexity_depth_grid1.mat</a></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><br></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><br></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">Thank you!</span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; "><br></span></pre><pre style="word-wrap: break-word; white-space: pre-wrap;"><span class="Apple-style-span" style="font-family: Arial; font-size: 12px; ">Massimo.</span></pre><div><br></div></body></html>