Matthias Michler wrote: > Hi Sebastian, Hi list, > > I'm not the one to decide this, but I think it is worth to try to remove > matplotlib.mlab routines, if their numpy counterparts provide the same > functionality or do I miss anything? After doing this one additionally could
We have been doing this via deprecations. If there is something we have missed--a function in mlab that is also in numpy and that is *not* deprecated in mlab--please be specific about what it is, and we will deprecate it. The functions like log2 are historical, part of a set contributed by Fernando Perez a long time ago. We tend to be cautious about ripping out such things, because user code may be depending on them. Maybe some of them should be deprecated. It is often hard to decide where and how to compromise between cleaning things up and maintaining backwards compatibility, just in case someone's code is depending on something obscure that has been there from early days. If there are *specific* recommendations about functions that should be deprecated or changed, we would be happy to consider those recommendations. > clean up the imports in pylab in order to have only one call "from > matplotlib.mlab import" instead of 3. Yes, I see now that the mlab imports in pylab are an incredibly ugly mess and desperately need to be cleaned up. Thanks for pointing that out. Multiple calls to "from matplotlib.mlab import ..." are fine with me, but I hate backslash line continuations, and I see that some functions are imported more than once. It looks like we must be importing nearly everything, in which case it would be better to simply import * and then delete a few things if we really don't want them. A more radical change, such as importing only a very few things, and/or breaking mlab up so as to separate out the parts that pylab needs to import, may be better. Eric > > kind regards Matthias > > On Friday 12 June 2009 14:41:28 Sebastian Haase wrote: >> On Fri, Jun 12, 2009 at 2:01 PM, John Hunter<jdh2...@gmail.com> wrote: >>> On Fri, Jun 12, 2009 at 6:10 AM, Sebastian Haase<seb.ha...@gmail.com> > wrote: >>>> On Fri, Jun 12, 2009 at 11:21 AM, Matthias >>>> >>>> Michler<matthiasmich...@gmx.net> wrote: >>>>> Hi Sebastian, >>>>> >>>>> You are right. A large number of numpy functions is part of pylab, but >>>>> I think this problem was solved by introducing matplotlib.pyplot, which >>>>> holds all plotting functions of matplotlib. The module pylab imports >>>>> these plotting functions and all the numpy-stuff in order to offer >>>>> plotting + numerical functions by one import. >>>>> >>>>> kind regards Matthias >>>> Matthias, >>>> thanks for the info. thats the info I was missing. >>>> >>>>>>> from matplotlib import pyplot >>>>>>> len(pyplot.__dict__) >>>> 191 >>>> >>>> Now I'm somewhat wondering about the things in pylab that are not in >>>> pyplot nor in numpy. >>>> E.g.: >>>> pyplot.log2 is not numpy.log2 >>>> or >>>> pyplot.window_hanning vs. numpy.hanning >>>> or >>>> pyplot.chisquare (which however is in numpy.random) >>> These symbols are not in svn: >>> >>> >>> In [59]: plt.log2 >>> ------------------------------------------------------------ >>> Traceback (most recent call last): >>> File "<ipython console>", line 1, in ? >>> AttributeError: 'module' object has no attribute 'log2' >>> >>> >>> In [60]: plt.window_hanning >>> ------------------------------------------------------------ >>> Traceback (most recent call last): >>> File "<ipython console>", line 1, in ? >>> AttributeError: 'module' object has no attribute 'window_hanning' >> Sorry - I meant pylab ! not pyplot ... >> There are those symbols. >> >> -S. > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users