From: Tony Yu <ts...@gm...> - 2013-07-10 01:54:58
|
On Tue, Jul 9, 2013 at 1:43 AM, Nelle Varoquaux <nel...@gm...>wrote: > On 9 July 2013 08:24, Eric Firing <ef...@ha...> wrote: > > On 2013/07/08 7:19 PM, Tony Yu wrote: > >> This is an idea that's been kicking around in my head for awhile. > >> Basically, the Axes class is way too expansive. Nelle made a major step > >> in the right direction with a PR that split it up into plotting and > >> non-plotting methods: > >> > >> https://github.com/matplotlib/matplotlib/pull/1931/files > >> > >> What I'd like to see is something that further separates plotting > >> methods into many smaller sub-modules/-packages. Organizing the code > >> this way would make it easier (for me at least) to read, understand, and > >> make changes to the code. > >> > >> I think that this could be done in an API-compatible way. In fact, a few > >> of the plotting methods are already implemented this way: In other > >> words, the bulk of the methods are implemented as functions outside of > >> Axes, and the Axes methods that are just thin wrappers around those > >> functions (or classes). See, for example, `streamplot`, `barbs`, and > >> `quiver` methods > > > > I agree. I would like to see logical groups of plot types broken out > > into modules. > > That's the second step in the refactoring of the axes module. > We now have to discuss how to organize plots in subtypes that make > sense. At Scipy, we discussed a bit about it, and we think it should > follow the same organization as the gallery, but I don't know whether > the gallery reorganization is logical enough right now to start the > refactoring straight away. > I knew I should have dropped by the matplotlib sprints :) The gallery categories really aren't that logical, but as long as the functions aren't meant to be directly imported from their sub-modules (instead you would use the Axes method or pyplot function), then nothing needs to be permanent, right? > > Should we discuss about this here, or in a ticket? > It's probably easier to discuss on a new ticket. Cheers, -Tony |