I added a fast polygon drawing collection class and backend renderer method. For large scatter plots (50000 points), the performance is 5 times faster across all backends and 10 times faster for the *Agg backends. Also, scatter works with many symbols: diamonds, sqaures, oriented triangles, circles and more. Currently these are all regular polygons but I can add more later when I finish general polygon collections and line collections. The scatter command returns a collection instance rather than a list of patches as before. If you are setting properties on the return values of scatter plots, you *may* need to change some code to use methods appropriate for collections, though the user API is largely compatible. See matplotlib.collections. Also the size argument is now in points^2 (the area of the symbol in points) and is not in data coords as before. This fixes a few problems: symbols are not skewed by unequally shaped axes, scatter works with log coords w/o distoring the symbol, and it is matlab compatible. The function scatter_classic is the old scatter function and will work identically. Let me know how this works with your scatter code, particularly if it breaks it! JDH
I must be doing something stupid, but I can't get the simplest loglog to work. For example: >>> x = arange(10.) + 2 >>> y = x**2 >>> y array([ 4., 9., 16., 25., 36., 49., 64., 81., 100., 121.]) >>> loglog(x,y) Traceback (most recent call last): [...] xt = self.transx.positions(x) File "C:\Python23\Lib\site-packages\matplotlib\transforms.py", line 621, in po sitions return scale*(self.func(x)-minin) + self._boundout.min() File "C:\Python23\Lib\site-packages\matplotlib\transforms.py", line 520, in lo gwarn raise ValueError('Cannot take log of non-positive data') ValueError: Cannot take log of non-positive data >>> Perry (v0.53.1 on windows 2000)
after doing a clf(), it works. I thought I had started with a clean session. Hmmm. I also notice that if I do something like loglog(arange(10.), arange(10.)) I get an error as I should, and then try againg with my first example, it still fails with the same error message. Somehow it the first error causes it to continue to fail unless clf() is performed. Perry
I keep forgetting that unless the clf() is done, that all the previous data elements are still present. And thus the error will repeat. (Waiting for that feature to allow autoclearing in interactive mode I guess) Perry
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes: Perry> I keep forgetting that unless the clf() is done, that all Perry> the previous data elements are still present. And thus the Perry> error will repeat. (Waiting for that feature to allow Perry> autoclearing in interactive mode I guess) I added a hold command and axes.hold property to matplotlibrc. In CVS. Next release is due out in a day or two (a couple of small bugs to squash). If any of you can test CVS that would be great - there have been a lot of changes since 0.53 that touch virtually every part of matplotlib (see the CHANGELOG in the sdist). Here is a snapshot if you don't have ready CVS access http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.54c.tar.gz - sorry no win32 snapshots at the ready. Todd, do you still want to build a numarray version? If so, I'll send you an sdist that I use to build my system and you can build for numarray and send me back the exe. JDH
On Mon, 2004年05月17日 at 18:48, John Hunter wrote: > >>>>> "Perry" == Perry Greenfield <pe...@st...> writes: > > Perry> I keep forgetting that unless the clf() is done, that all > Perry> the previous data elements are still present. And thus the > Perry> error will repeat. (Waiting for that feature to allow > Perry> autoclearing in interactive mode I guess) > > I added a hold command and axes.hold property to matplotlibrc. In > CVS. > > Next release is due out in a day or two (a couple of small bugs to > squash). If any of you can test CVS that would be great - there have > been a lot of changes since 0.53 that touch virtually every part of > matplotlib (see the CHANGELOG in the sdist). Here is a snapshot if > you don't have ready CVS access > http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.54c.tar.gz > - sorry no win32 snapshots at the ready. > > Todd, do you still want to build a numarray version? If so, I'll send > you an sdist that I use to build my system and you can build for > numarray and send me back the exe. Yes. Please send me the sdist. Todd