Re: [matplotlib-devel] re-draw problem with FigureCanvasQTAgg in backend_qt4agg
Hi Alberto, On Wed, Jun 3, 2009 at 10:49, Alberto Soto wrote: > Good afternoon, > > I am working on a GUI that utilizes the FigureCanvasQTAgg. The GUI consists > of a Qt main window were the central widget includes a Figure. The problem > arises when this central widget interacts with re-size events of my dock > widgets. The Plot is not correctly re-drawn, it ‘leaks’ into the dock > widgets. > > I think a picture would better describe this problem: > > Here we see 2 scripts running, the 1st one’s dock widgets have been re-sized > by the user and the plot has ‘leaked’ into the right side dialog. The second > picture shows how the dialog normally looks. > > > > I am also attaching a simple script with the GUI that has the problem. > > If I move or do anything to re-trigger a paint event the plot is re-drawn > correctly. I see no problem here. I'm on a debian sid OS, with $ python -c "import matplotlib as mpl ; print mpl.__version__" 0.98.5.3 and $ apt-show-versions python-qt4 python-qt4/testing uptodate 4.4.4-6 what do you have installed? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] re-draw problem with FigureCanvasQTAgg in backend_qt4agg
Please keep the list in the loop: adding it again. On Wed, Jun 3, 2009 at 12:16, Alberto Soto wrote: > Hi Sandro, > > I have > $ python -c "import matplotlib as mpl ; print mpl.__version__" > 0.98.5.2 > Installed and am running PyQt v4.4.3 because I am forced to rest on > Python 2.5 > > I will try installing 0.98.5.3 and see if that makes a difference. > I have seen the same problem in a Unix installation, I will try and see > which matplotlib version they were running. > > Meanwhile can you try re-sizing the dock widgets as fast as possible? If > you use the mouse to re-size them but do it gradually, the problem does > not surface. oh sorry, the *dock*... I understood to resize the window. :( Resizing the dock panel I see "part" of the problem": I see the "shadow" on the matplotlib widget but not on the right dock (I'm unable to screenshot though). > Thank you and I will see what happened with the new instalation You're welcome -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] FW: re-draw problem with FigureCanvasQTAgg in backend_qt4agg
Hi Sandro, I have $ python -c "import matplotlib as mpl ; print mpl.__version__" 0.98.5.2 Installed and am running PyQt v4.4.3 because I am forced to rest on Python 2.5 I will try installing 0.98.5.3 and see if that makes a difference. I have seen the same problem in a Unix installation, I will try and see which matplotlib version they were running. Meanwhile can you try re-sizing the dock widgets as fast as possible? If you use the mouse to re-size them but do it gradually, the problem does not surface. Thank you and I will see what happened with the new instalation -Original Message- From: matrixh...@gmail.com [mailto:matrixh...@gmail.com] On Behalf Of Sandro Tosi Sent: Wednesday, June 03, 2009 11:44 AM To: Alberto Soto Cc: matplotlib-devel@lists.sourceforge.net Subject: Re: [matplotlib-devel] re-draw problem with FigureCanvasQTAgg in backend_qt4agg Hi Alberto, On Wed, Jun 3, 2009 at 10:49, Alberto Soto wrote: > Good afternoon, > > I am working on a GUI that utilizes the FigureCanvasQTAgg. The GUI consists > of a Qt main window were the central widget includes a Figure. The problem > arises when this central widget interacts with re-size events of my dock > widgets. The Plot is not correctly re-drawn, it 'leaks' into the dock > widgets. > > I think a picture would better describe this problem: > > Here we see 2 scripts running, the 1st one's dock widgets have been re-sized > by the user and the plot has 'leaked' into the right side dialog. The second > picture shows how the dialog normally looks. > > > > I am also attaching a simple script with the GUI that has the problem. > > If I move or do anything to re-trigger a paint event the plot is re-drawn > correctly. I see no problem here. I'm on a debian sid OS, with $ python -c "import matplotlib as mpl ; print mpl.__version__" 0.98.5.3 and $ apt-show-versions python-qt4 python-qt4/testing uptodate 4.4.4-6 what do you have installed? Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] re-draw problem with FigureCanvasQTAgg in backend_qt4agg
Hi again, I have just installed matplotlib 0.98.5.3 and the problem seems to have been fixed. But the movements are a lot slower though, (probably because a lot more paint events were added?). Thanks for the help. -Original Message- From: matrixh...@gmail.com [mailto:matrixh...@gmail.com] On Behalf Of Sandro Tosi Sent: Wednesday, June 03, 2009 12:35 PM To: Alberto Soto; matplotlib development list Subject: Re: [matplotlib-devel] re-draw problem with FigureCanvasQTAgg in backend_qt4agg Please keep the list in the loop: adding it again. On Wed, Jun 3, 2009 at 12:16, Alberto Soto wrote: > Hi Sandro, > > I have > $ python -c "import matplotlib as mpl ; print mpl.__version__" > 0.98.5.2 > Installed and am running PyQt v4.4.3 because I am forced to rest on > Python 2.5 > > I will try installing 0.98.5.3 and see if that makes a difference. > I have seen the same problem in a Unix installation, I will try and see > which matplotlib version they were running. > > Meanwhile can you try re-sizing the dock widgets as fast as possible? If > you use the mouse to re-size them but do it gradually, the problem does > not surface. oh sorry, the *dock*... I understood to resize the window. :( Resizing the dock panel I see "part" of the problem": I see the "shadow" on the matplotlib widget but not on the right dock (I'm unable to screenshot though). > Thank you and I will see what happened with the new instalation You're welcome -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] FltkAgg Patch
On Tue, Jun 2, 2009 at 4:52 PM, Daniel wrote: > Hello All, > > I have attached a patch that updates backend_fltkagg.py to use the new > Transform APIs for 0.98.0 > (http://matplotlib.sourceforge.net/api/api_changes.html#notes-about-the-transforms-refactoring). > Without these changes, trying to use FLTKAgg causes a crash with a very > cryptic error. > > Thanks for all your work on matplotlib! Thanks Daniel for the patch -- it looks like Michael has committed this to the 98 release branch and merged it into the trunk, so it will make the next release. JDH -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] Curvelinear grid support
Jae-Joon, I just saw your curvelinear grid support fall into SVN. Very impressive! We actually may have a use for it here at Space Telescope for drawing "World Coordinate System (WCS)" plots. One quick question though -- it seems that this functionality is completely independent of the axes_grid stuff, which is primarily about layout out axes within a figure, correct? Is there a reason why it's part of the axes_grid toolkit that I'm missing? Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Curvelinear grid support
On Wed, Jun 3, 2009 at 10:04 AM, Michael Droettboom wrote: > Jae-Joon, > > I just saw your curvelinear grid support fall into SVN. Very > impressive! We actually may have a use for it here at Space Telescope > for drawing "World Coordinate System (WCS)" plots. I am getting an exception with a clean numpy/mpl build from svn HEAD> This appears platform specific because I am only seeing it on my solaris box at work, not on a linux box I am also testing on. jo...@flag:axes_grid> uname -a SunOS flag 5.10 Generic_118855-15 i86pc i386 i86pc Here is the complete traceback: Traceback (most recent call last): File "demo_curvelinear_grid.py", line 127, in ? plt.draw() File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/pyplot.py", line 350, in draw get_current_fig_manager().canvas.draw() File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_tkagg.py", line 215, in draw FigureCanvasAgg.draw(self) File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/figure.py", line 774, in draw for a in self.axes: a.draw(renderer) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/axislines.py", line 1350, in draw super(Axes, self).draw(renderer, inframe) File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/home/titan/johnh/dev/lib/python2.4/site-packages/matplotlib/axes.py", line 1826, in draw a.draw(renderer) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/axislines.py", line 874, in draw self._grid_helper.update_lim(self.axes) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/axislines.py", line 564, in update_lim self._update(x1, x2, y1, y2) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/grid_helper_curvelinear.py", line 114, in _update self._update_grid(x1, y1, x2, y2) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/grid_helper_curvelinear.py", line 149, in _update_grid self.grid_info = self.grid_finder.get_grid_info(x1, y1, x2, y2) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/grid_finder.py", line 241, in get_grid_info x1, y1, x2, y2) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/grid_finder.py", line 118, in get_grid_info bb) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/grid_finder.py", line 163, in _clip_grid_lines_and_find_ticks xy, tcks = clip_line_to_rect(lx, ly, bb) File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/clip_path.py", line 72, in clip_line_to_rect ly3, lx3, c_top_ = clip(ly2, lx2, y1, clip="right") File "/home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/clip_path.py", line 51, in clip a = degrees(atan2(dy, dx)) ValueError: math domain error In the debugger: In [3]: %debug > /home/titan/johnh/dev/lib/python2.4/site-packages/mpl_toolkits/axes_grid/clip_path.py(51)clip() 50 ---> 51 a = degrees(atan2(dy, dx)) 52 _pos_angles.append((x0, y0, a)) ipdb> print dy, dx -0 0.0 ipdb> print type(dy), type(dx) ipdb> print atan2(dy, dx) *** ValueError: math domain error The root cause seems to be the math.atan2 function on solaris In [4]: import math In [5]: math.atan2(0., 0.) Traceback (most recent call last): File "", line 1, in ? ValueError: math domain error so we may want to special case the code to handle 0.0, 0.0 as inputs. JDH -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Curvelinear grid support
On Wed, Jun 3, 2009 at 11:04 AM, Michael Droettboom wrote: > Jae-Joon, > > I just saw your curvelinear grid support fall into SVN. Very > impressive! We actually may have a use for it here at Space Telescope > for drawing "World Coordinate System (WCS)" plots. > Well, the WCS support is actually my whole motivation for this (I'm also in astronomy). > One quick question though -- it seems that this functionality is > completely independent of the axes_grid stuff, which is primarily about > layout out axes within a figure, correct? Is there a reason why it's > part of the axes_grid toolkit that I'm missing? > Well, axes_grid is actually a byproduct of my effort to nicely display FITS image with matplotlib. And I tend to put everything that is not astronomy-specific into axes_grid toolkit, which may not be such a good idea. While one needs to use a custom Axes class (axes_grid.axislines.Axes) to support the curvelinear grid, this part of the code can be easily separated out. But I'm not sure if creating another mpl_toolkit package is best way to do here. Any suggestion will be welcomed. Regards, -JJ > Cheers, > Mike > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > > -- > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Curvelinear grid support
On Wed, Jun 3, 2009 at 11:22 AM, John Hunter wrote: > so we may want to special case the code to handle 0.0, 0.0 as inputs. Thanks a lot for tracking this down! It would be best if my algorithm does not produce such a case, but evidently it does. Yes, I'll put some code to treat this special case and also see if I can avoid such cases by improving my algorithm. Thanks again. -JJ -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel