|
From: Fernando P. <Fer...@co...> - 2004-08-21 21:43:24
|
Abraham Schneider wrote: > Okay, I think I've gotten all the major bugs out, and the code can be > upgraded from 'major hack' to 'minor hack'. The files that were changed > (as well as a directory patch) can be found at: > > http://www.cns.nyu.edu/~abes/matplotlib/ [...] I've stayed off this discussion because I'm a bit swamped, but I'd like to make a couple of quick comments. 1. I think plugin support is a fantastic idea, but I hope it can be made user-extensible in local paths. I recently modified mayavi (available in current CVS) precisely in this manner, and I think it's a very useful thing. In lab settings where users are not allowed to write to system directories, it becomes very important that they can add their own plugins in local paths. This also allows you to keep your personal extensions alive as matplotlib versions are upgraded, since your directories are untouched. What I did for mayavi was to add a search-path option to mayavi, made of colon-separated dirs with ~user/$VAR support. Any such dir gets added to mayavi's search path for user-defined filters and modules (the equivalent of plugins), and you can load a user module just like you can load a builtin: load_module('Glyphs') -> loads mayavi's Glyphs module load_module('User.Glyphs') -> loads a user-defined Glyphs module from the search path. I think it's important that it's a _path_ and not a single directory, because this allows a research group to maintain shared extensions suited for their purposes, and individual users to add personal modifications which don't fit group projects. 2. From some of your syntax struggles, I'm starting to wonder whether it would be best to turn the .matplotlibrc file into a proper python one. I followed the same approach with ipython of having a custom syntax, and now I regret it. It appears easier initially, but in the long term it's clunky (at least for ipython). For ipython's next major revision, I plan on dumping its own rc format and allowing users to define their configuration using plain python syntax. Just some thoughts. Anyway, I htink this is great for matplotlib, and I hope you can bring it to a good conclusion. Great work! Best, f |