Jouni K. Seppänen wrote: > Christopher Barker <chris.bar...@noaa.gov> writes: > >> Joey Wilson wrote: >>> I would like to be able to save the figures from >>> matplotlib in an editable form, without flattening down to an image >>> file. >> I think to do this right, you'd need to completely re-design MPL to be >> based on a more declarative structure: [...] but it seems that MPL is >> built to be used from a scripting interface instead: a series of >> commands that builds the figure. > > I don't think that is the real problem. How matplotlib works is that the > plotting commands build up a data structure consisting of various > objects pointing to each other, and when you call show or savefig, the > data structure is traversed and the appropriate backend functions are > called. In principle it should not be very difficult to serialize this > data structure, but since extension objects are involved, some work > might be needed to get it right. > > What I think is the really difficult part is keeping the serialized > format somehow usable across different versions of matplotlib. When > anything changes in the various classes, the developers would need to > decide how the change is reflected in the on-disk format, how files > corresponding to the old class should be read in using the new class, > etc. Perhaps something like Google's protocol buffers could be used to > make this easier, but it would still be an burden on all subsequent > development. >
Exactly. I *strongly* oppose any move in this direction. It would be enabling bad workflow strategy on the part of users, providing no benefit that cannot be achieved better with a good workflow strategy, and adding complexity. We have enough of that already. We need to think about how to clean up mpl and make it easier to maintain and improve, not clutter it with ever more complexity. Eric ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel