SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] Persistent Matplotlib Figures

From: Eric F. <ef...@ha...> - 2009年12月19日 20:03:53
Jouni K. Seppänen wrote:
> Christopher Barker <Chr...@no...> 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

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /