Re: [Matplotlib-users] Some remarks/questions about perceived slowness of matplotlib
David Cournapeau wrote: But the show case is more interesting: ncalls tottime percall cumtime percall filename:lineno(function) 10.0020.0023.8863.886 slowmatplotlib.py:177(bench_imshow_show) 10.0000.0003.8843.884 slowmatplotlib.py:163(bench_imshow) 10.6980.6983.0033.003 /home/david/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py:70(show) 20.0000.0002.2661.133 /home/david/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py:275(expose_event) 10.0090.0092.2662.266 /home/david/local/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py:71(_render_figure) 10.0000.0002.2562.256 /home/david/local/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py:385(draw) 10.0000.0002.2532.253 /home/david/local/lib/python2.4/site-packages/matplotlib/figure.py:510(draw) 10.0000.0002.2512.251 /home/david/local/lib/python2.4/site-packages/matplotlib/axes.py:994(draw) 10.0050.0051.9511.951 /home/david/local/lib/python2.4/site-packages/matplotlib/image.py:173(draw) 10.0960.0961.9461.946 /home/david/local/lib/python2.4/site-packages/matplotlib/image.py:109(make_image) 10.0020.0021.8501.850 /home/david/local/lib/python2.4/site-packages/matplotlib/cm.py:50(to_rgba) 10.0010.0010.9490.949 /home/david/local/lib/python2.4/site-packages/matplotlib/colors.py:735(__call__) 10.0970.0970.8990.899 /home/david/local/lib/python2.4/site-packages/matplotlib/colors.py:568(__call__) 3250.0500.0000.6710.002 /home/david/local/lib/python2.4/site-packages/numpy/core/ma.py:533(__init__) 10.6000.6000.6000.600 /home/david/local/lib/python2.4/site-packages/numpy/core/fromnumeric.py:282(resize) 10.0000.0000.5960.596 /home/david/local/lib/python2.4/site-packages/matplotlib/pylab.py:1894(imshow) 100.5700.0570.5700.057 /home/david/local/lib/python2.4/site-packages/numpy/oldnumeric/functions.py:117(where) 30.0000.0000.5130.171 /home/david/local/lib/python2.4/site-packages/matplotlib/pylab.py:883(gca) 10.0000.0000.5130.513 /home/david/local/lib/python2.4/site-packages/matplotlib/pylab.py:950(ishold) 40.0000.0000.4080.102 /home/david/local/lib/python2.4/site-packages/matplotlib/pylab.py:903(gcf) For more details, see the .kc files which are the in the tbz2 archive, with the script for generating profiles for kcachegrind, Here is some stuff I tried: - first, we can see that in expose_event (one is expensive, the other negligeable, from my understanding), two calls are pretty expensive: the __call__ at line 735 (for normalize functor) and one for __call__ at line 568 (for colormap functor). - for normalize functor, one line is expensive: val = ma.array(clip(val.filled(vmax), vmin, vmax), mask=mask). If I put a test on mask when mask is None (which it is in my case), then the function becomes negligeable. - for colormap functor, the 3 where calls are expensive. I am not sure to understand in which case they are useful; if I understand correctly, one tries to avoid values out of range (0, N), and force out of range values to be clipped. Isn't there an easier way than using where ? If I remove the where in the colormap functor, I have a 4x speed increase for the to_rgba function. After that, it becomes a bit more tricky to change things for someone like me who have no knowledge about matplotlib internals. Cheers, David - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] font_manager.py gives following traceback
I have received reports from clients with the following traceback or similar. This happens when application is packaged with py2exe. Traceback (most recent call last): File appwine.pyo, line 1341, in OnToolbarChart File frameplotmpl.pyo, line 19, in ? File matplotlib\backends\__init__.pyo, line 19, in ? File matplotlib\backends\backend_wxagg.pyo, line 18, in ? File matplotlib\backends\backend_agg.pyo, line 82, in ? File matplotlib\figure.pyo, line 3, in ? File matplotlib\axes.pyo, line 14, in ? File matplotlib\axis.pyo, line 21, in ? File matplotlib\font_manager.pyo, line 982, in ? File matplotlib\font_manager.pyo, line 826, in __init__ File matplotlib\font_manager.pyo, line 819, in rebuild File matplotlib\font_manager.pyo, line 454, in createFontDict SystemError: error return without exception set Any hints of what might cause this would be very welcome. Werner P.S. I am still on matplotlib version '0.82' (plan to upgrade to newer version but need to upgrade to Unicode wxPython first), with Python 2.4 and wxPython 2.6.x - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] broken images on tutorial
When I look at http://matplotlib.sourceforge.net/tutorial.html with Safari, I see a lot of broken images. Any ideas? smime.p7s Description: S/MIME cryptographic signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Some remarks/questions about perceived slowness of matplotlib
Eric Firing wrote: Regarding the clip line, I think that your test for mask is None is not the right solution because it knocks out the clipping operation, but the clipping is intended regardless of the state of the mask. I had expected it to be a very fast operation, for what it's worth, a few years ago a wrote a fast_clip c extension that did clip without making nearly as many temporary arrays as the Numeric one -- I don't know what numpy does , I haven't needed a fast clip recently. I'd be glad to send the code to anyone interested. Now I recall very recent discussion explaining why where is slow compared to indexing with a boolean, so I know I can speed it up with numpy. Unfortunately Numeric does not support this, so maybe what will be needed is numerix functions that take advantage of numpy when available. good idea. This is one of those times when I really wish we could drop Numeric and numarray support *now* and start taking full advantage of numpy. I'd love that too. Maybe your proposal is a good one, though -- make numeric functions that are optimized for numpy. I think that's a good way to transition. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] *EGG* now freezes at this same place always....
Thanks for help. Now it freezes always here... GTK requires pygtk GTKAgg requires pygtk TKAgg requires TkInter warning: no files found matching 'MANIFEST' warning: no files found matching 'lib/matplotlib/toolkits' no previously-included directories found matching 'examples/_tmp_*' In file included from /usr/include/python2.4/Python.h:8, from CXX/Objects.hxx:9, from CXX/Extensions.hxx:19, from src/_transforms.h:12, from src/_ns_transforms.cpp:5: /usr/include/python2.4/pyconfig.h:832:1: warning: _POSIX_C_SOURCE redefined In file included from /usr/include/c++/3.3/i486-linux/bits/os_defines.h:39, from /usr/include/c++/3.3/i486-linux/bits/c++config.h:35, from /usr/include/c++/3.3/functional:53, from src/_ns_transforms.cpp:1: /usr/include/features.h:131:1: warning: this is the location of the previous definition Chris - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 'fill' command broken in svn
It's fixed now. Eric Rob Hetland wrote: fill(x, y) returns an error like: [] /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- packages/matplotlib/axes.py in update_datalim(self, xys) 966 # and the data in xydata 967 xys = asarray(xys) -- 968 self.dataLim.update_numerix_xy(xys, -1) 969 970 type 'exceptions.TypeError': Bbox::update_numerix_xy expected numerix array - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users