Re: [Matplotlib-users] Has nxutils been removed from mpl?
As someone who has never contributed to matplotlib before, are there any instructions on how to contribute to writing tests. We have some data and scripts we could probably convert to tests for the nxutils points in poly functions. Should I just do i pull the branch nxutilsbackwards branch and make a pull request after adding tests on github? - dharhas >>> Michael Droettboom 3/8/2012 5:51 PM >>> There is a proposed solution to all of this here: https://github.com/matplotlib/matplotlib/pull/746 Please test -- I don't have any nxutils-using code myself, and matplotlib itself has none. We should probably convert some of the nxutils code in the wild into some unit tests. Mike On 03/08/2012 12:37 PM, Benjamin Root wrote: On Thu, Mar 8, 2012 at 11:16 AM, Benjamin Root wrote: On Thu, Mar 8, 2012 at 10:47 AM, John Hunter wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my existing apps. In order to deprecate nxutils, this functionality needs to be added to Path. Otherwise, nxutils *must* be reinstated before the next release. Michael has already agreed to make a nxutils compatibility layer that would have the same interface as the old nxutils. So we are talking about performance, not core functionality. We should remember that Michael did the lion's share of the work on porting mpl to python 3 (https://github.com/matplotlib/matplotlib/pull/565/commits). He elected not to port all of the C++ if he could replace some of the functionality with the core. So those who rely on bare metal speed the you are getting in nxutils should step up to either : 1) help with the port of nxutils to python 3 2) help with exposing methods in _path.cpp that are almost as fast or faster 3) live with slower speeds in the compatibility layer he has agreed to write 4) ask (nicely) for someone to help you I prefer option 2 because this is fairly easy and avoids code redundancy. It would take just a few lines of extra code to do this with the python sequence protocol as inputs and python lists as return values. It would take a bit more to support numpy arrays as input and output, and we should get input from Michael about the desirability of making _path.cpp depend on numpy. I don't see the harm, but I'd like to verify. In my opinion, a slower implementation in a nxutils.py compatibility module is not a release stopper, even if it is undesirable. JDH Don't get me wrong. If help is needed, I can certainly provide it since it is my itch. I am just a little exasperated with how this issue has been handled up to now. The shim is a very good idea and it should have been done back when the py3k merge happened. I didn't press the issue then because I was traveling and didn't have time to examine the issue closely, and having _nxutils.so still in my build hide the problem from me (my own fault). As for shim implementation, I would be willing to accept a slightly slower function now (with the promise of improvements later), but if the implementation is too much slower, then effort will need to be made to get it up to acceptable levels. I know of several users **cough**my future employer**cough** who uses functionality such as this, and they would not be happy if their products are dragged down by such a bottleneck. Probably about time I dug more into CXX wrapped stuff... Ben Root Looking over the code, it looks like we could generalize point_in_path_impl() into points_in_path_impl(). The current code iterates through the path vertices to test a single point. Putting this action inside a loop (for each point that we want to test) would mean that this iterator has to be processed each time, which I suspect would kill performance when the number of vertices is far greater than the number of test points. Tinkering Ben Root -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https
Re: [Matplotlib-users] Has nxutils been removed from mpl?
+ one on this issue. One of the big advantages of the nxutils points in poly is that you could pass it a large numpy array of points and get back a mask. We found this to be significantly faster than using looping through the single point in poly algorithms from packages like shapely. Echoing Jorge's question how would we do this using contains_point(). - dharhas >>> Jorge Scandaliaris 3/8/2012 3:33 AM >>> Benjamin Root writes: > > Essentially, you make a Path object using the vertices, and then use its > contains_point() method. > Ben Root > OK, but given that contains_point works with a *single* point at a time, I have to call it for all my points which is a bit more cumbersome, or am I missing something? Jorge -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Python Job Opening at TWDB.
Hi All, Sorry for cross posting, I know there is a large overlap in these three mailing lists. We have an opening in my team for a full time temporary employee. This position has current funding for the next 6-9 months with additional federal funding arriving in the Spring that should allow the position to continue for at least 2 more years. Details at the following link: http://www.twdb.state.tx.us/jobs/doc/12-03.pdf Please forward this email to any folks who may be interested. They can contact me if they have any questions about the position. thanks, - dharhas Dharhas Pothina, Ph.D., P.E. Team Lead - Data, Analysis and Modeling Surface Water Resources Division Texas Water Development Board 1700 North Congress Ave. P.O. Box 13231 Austin, TX 78711-3231 Tel: (512) 936-0818 Fax: (512) 936-0816 dharhas.poth...@twdb.state.tx.us www.twdb.state.tx.us <> -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.
> There's no way around the ``Decimal``? Otherwise I cannot confirm the > inelegancyness except this construct ;-) the moneyfmt routine I downloaded requires the Decimal package (i.e decimal.Decimal). I didn't have time to try writing my own version. It has a bug that if you specify number of decimal places = 0 it shows the trailing decimal point. - dharhas -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.
> Just got Goekhan's message, try a combination of both, might be worth. a little inelegant but I got it working by combining both ideas: def thousands(x, pos): 'The two args are the value and tick position' xnew = moneyfmt(Decimal(x.__str__())) return xnew where moneyfmt is the function defined in Gokhan's link. and then: formatter = FuncFormatter(thousands) ... ax1.yaxis.set_major_formatter(formatter) thanks - d -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.
Hi All, I'm assuming this is possible and common but I'm not finding the correct combination of search terms to find any examples on the mailing list or online on how to do this. I'd like to display the y-axis tick labels in the 'comma' notation i.e. 234004 = 234,004 1237689 = 1,237,689 etc thanks, - dharhas -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib 1.0.0
> Contour fixes and and triplot: > Additionally, he has contributed a new module matplotlib.tri and > helper function triplot for creating and plotting unstructured > triangular grids. See > http://matplotlib.sf.net/api/pyplot_api.html#matplotlib.pyplot.triplot > for the function and > http://matplotlib.sf.net/examples/pylab_examples/triplot_demo.html > for example code. This is an awesome addition. Thanks to Ian Thomas. We do a lot of ocean modeling with unstructured triangular grids and this will be very useful. There currently is no good way to do this without using commercial packages like tecplot. - dharhas -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Index Out of Range Error after Installationon RHEL5
For some reason, installing inside a virtualenv was the problem. I installed it using easy_install outside of the virtualenv and it worked fine. The virtualenv setup works on the other RHEL5 machine so I'm not sure why it didn't on this one. thanks, - dharhas >>> Benjamin Root 6/8/2010 12:56 PM >>> Then I haven't a clue. Maybe someone else has some insight? Ben Root On Mon, Jun 7, 2010 at 4:10 PM, Dharhas Pothina < dharhas.poth...@twdb.state.tx.us> wrote: > Ben, > > The matplotlib on the other working machine is using python 2.6.4. On this > machine I am using python 2.6.5. > > The default python on both machines in python 2.4 but I set up python 2.6 > as an alternate install in /opt/python26. > > - dharhas > > > >>> Benjamin Root 6/7/2010 3:56 PM >>> > Dharhas, > > Is it possible to find out which version of python was installed for your > other RHEL5 machine? I don't know if that makes a difference or not, but > RHEL5 by default uses Python 2.4. > > Ben Root > > > On Mon, Jun 7, 2010 at 1:48 PM, Dharhas Pothina < > dharhas.poth...@twdb.state.tx.us> wrote: > > > Hi, > > > > I have Python 2.6 installed on RHEL5 (and Numpy 1.4.1) and am trying to > > install matplotlib. Installation occurs without any error messages > although > > I do get a bunch of warnings at the end. > > > > /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching > for > > -ltk8.4 > > /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching > > for -ltcl8.4 > > /usr/bin/ld: skipping incompatible /usr/lib/libfreetype.so when searching > > for -lfreetype > > /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for > -lz > > /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz > > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for > -lm > > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm > > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for > -lm > > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm > > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching > > for -lpthread > > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching > for > > -lpthread > > /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for > -lc > > /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc > > > > When I try using matplotlib I get the following error: > > > > Python 2.6.5 (r265:79063, May 18 2010, 11:20:57) > > [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import matplotlib.pyplot as plt > > >>> plt.plot([1,0],[2,3]) > > Traceback (most recent call last): > > File "", line 1, in > > File > > > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/pyplot.py", > > line 2141, in plot > >ret = ax.plot(*args, **kwargs) > > File > > > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", > > line 3437, in plot > >self.autoscale_view(scalex=scalex, scaley=scaley) > > File > > > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", > > line 1624, in autoscale_view > >XL = self.xaxis.get_major_locator().view_limits(x0, x1) > > File > > > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/ticker.py", > > line 1014, in view_limits > >return np.take(self.bin_boundaries(dmin, dmax), [0,-1]) > > File > > > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/numpy/core/fromnumeric.py", > > line 103, in take > >return take(indices, axis, out, mode) > > IndexError: index out of range for array > > > > > > Any help would be appreciated. I've tried several versions of matplotlib. > I > > also was able to get it installed on a different RHEL5 machine a while > back > > and am not sure what is different about this machine. > > > > thanks > > > > - dharhas > > > > > > > -- > > ThinkGeek and WIRED's GeekDad team up for the Ultimate > > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > > lucky parental unit. See the prize list and enter to win: > > http://p.sf.net/sfu/thinkgeek-promo > > ___ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Index Out of Range Error after Installation on RHEL5
Ben, The matplotlib on the other working machine is using python 2.6.4. On this machine I am using python 2.6.5. The default python on both machines in python 2.4 but I set up python 2.6 as an alternate install in /opt/python26. - dharhas >>> Benjamin Root 6/7/2010 3:56 PM >>> Dharhas, Is it possible to find out which version of python was installed for your other RHEL5 machine? I don't know if that makes a difference or not, but RHEL5 by default uses Python 2.4. Ben Root On Mon, Jun 7, 2010 at 1:48 PM, Dharhas Pothina < dharhas.poth...@twdb.state.tx.us> wrote: > Hi, > > I have Python 2.6 installed on RHEL5 (and Numpy 1.4.1) and am trying to > install matplotlib. Installation occurs without any error messages although > I do get a bunch of warnings at the end. > > /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching for > -ltk8.4 > /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching > for -ltcl8.4 > /usr/bin/ld: skipping incompatible /usr/lib/libfreetype.so when searching > for -lfreetype > /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz > /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm > /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm > /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching > for -lpthread > /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for > -lpthread > /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc > /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc > > When I try using matplotlib I get the following error: > > Python 2.6.5 (r265:79063, May 18 2010, 11:20:57) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import matplotlib.pyplot as plt > >>> plt.plot([1,0],[2,3]) > Traceback (most recent call last): > File "", line 1, in > File > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/pyplot.py", > line 2141, in plot >ret = ax.plot(*args, **kwargs) > File > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", > line 3437, in plot >self.autoscale_view(scalex=scalex, scaley=scaley) > File > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", > line 1624, in autoscale_view >XL = self.xaxis.get_major_locator().view_limits(x0, x1) > File > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/ticker.py", > line 1014, in view_limits >return np.take(self.bin_boundaries(dmin, dmax), [0,-1]) > File > "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/numpy/core/fromnumeric.py", > line 103, in take >return take(indices, axis, out, mode) > IndexError: index out of range for array > > > Any help would be appreciated. I've tried several versions of matplotlib. I > also was able to get it installed on a different RHEL5 machine a while back > and am not sure what is different about this machine. > > thanks > > - dharhas > > > -- > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Index Out of Range Error after Installation on RHEL5
Hi, I have Python 2.6 installed on RHEL5 (and Numpy 1.4.1) and am trying to install matplotlib. Installation occurs without any error messages although I do get a bunch of warnings at the end. /usr/bin/ld: skipping incompatible /usr/lib/libtk8.4.so when searching for -ltk8.4 /usr/bin/ld: skipping incompatible /usr/lib/libtcl8.4.so when searching for -ltcl8.4 /usr/bin/ld: skipping incompatible /usr/lib/libfreetype.so when searching for -lfreetype /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc When I try using matplotlib I get the following error: Python 2.6.5 (r265:79063, May 18 2010, 11:20:57) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.pyplot as plt >>> plt.plot([1,0],[2,3]) Traceback (most recent call last): File "", line 1, in File "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/pyplot.py", line 2141, in plot ret = ax.plot(*args, **kwargs) File "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", line 3437, in plot self.autoscale_view(scalex=scalex, scaley=scaley) File "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/axes.py", line 1624, in autoscale_view XL = self.xaxis.get_major_locator().view_limits(x0, x1) File "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/matplotlib/ticker.py", line 1014, in view_limits return np.take(self.bin_boundaries(dmin, dmax), [0,-1]) File "/home/swdata/.virtualenvs/web/lib/python2.6/site-packages/numpy/core/fromnumeric.py", line 103, in take return take(indices, axis, out, mode) IndexError: index out of range for array Any help would be appreciated. I've tried several versions of matplotlib. I also was able to get it installed on a different RHEL5 machine a while back and am not sure what is different about this machine. thanks - dharhas -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users