On 24/10/2013 20:39, Chris Barker wrote: > On Thu, Oct 24, 2013 at 8:29 AM, Michael Droettboom <md...@stsci.edu> wrote: >> Here are the notes with action items from the meeting: > > thanks for posting that. I see: > > pylab - should it stay or should it go? > > Comment from the peanut gallery: > > Go. > > But beyond that, matplotlib.pyplot is a big mess of both the > matlab-style state-machine current figure, current axis stuff, and > what you need to do (at least reasonably on the command line) OO > interface. > > This makes it really hard to teach to newbies -- I just did this last > night, and made a point to use tutorials that emphasize the OO > interface (Thanks Ben Root, Katy Huff, and Antony Scopatz, and I'm > sure others that helped put the materials together that I stole > from...). However, there were still a number of examples in there that > just called "plot()" or whatever, and even if there were not, the > namespace is really cluttered with stuff! > > Anyone like the idea of an matplotlib.ooplot namespace that would have > just what you need to use the oo style?
Hello, I agree that the matlab like API should be at least discouraged, however I think there are some shortcomings both in the documentation and examples and in the object oriented API and functions exposed through the pyplot namespace that make switching more cumbersome that it has to bee. One thing I dislike is, for example, the add_subplot() method: f = plt.figure() a = f.add_subplot(111) a.plot(x, y) it feels completely out of place (why I need to add a subplot if the only thing I want to do is to create a figure with a single plot in it?) and kind of magic (what is the number 111?). The API is also very old fashion python (getter and setter methods for example) and many methods try to emulate too much of the bad API design of matlab (doing completely different things depending on the kind and number of parameters). I believe it would be possible to come up with a more modern and lean API that would be easier and nicer to use. If we have to deprecate the matlab style API, maybe it would be worth to replace it with something substantially better. PS: Chris, would you mind sharing the material you put together and links to material from which you stole from? Thanks! Cheers, Daniele ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel