saving figures

Erik -

You write that adding a 'save' is difficult.
I can see it is involved, but don't quite see how it is specifically difficult.
The way I see it, every item that is added to a figure needs a method
to write itself to a file. So you loop through all lines, polygons,
and such, and write them to a file. I am sure you guys have thought
about this, and maybe have a much better approach.

Is this something that is on the to-do or wish list? Maybe not top
priority, but it would sure be nice,

Thanks,

Mark

Jordan Atlas wrote:

Hello,

    Is it possible to 'save' a matplotlib figure object using something
like the python pickle module? Basically, I'd like to save the 'figure'
as a file so that I can open it and manipulate it if something is
wrong. Alternative suggestions are welcome.

Thank you,

--Jordan Atlas

Jordan,

No, this has been requested before but it is not an easy modification of
mpl to make. The alternative suggestion is to always encapsulate the
making of a figure in a script, and then save the script and the data.
If you want to save the combination in a single file, then arrange for
the script and data to reside in a single subdirectory, and zip or tar
that subdirectory.

Eric

Last time we looked at it, there were problems pickling CXX extension
code, and in particular our transformations objects were deeply nested
CXX objects. In the transforms branch, they will be pure python and
numpy, and we can revisit the issue again when the branch is folded
into the trunk.

ยทยทยท

On Nov 16, 2007 2:54 PM, Mark Bakker <markbak@...287...> wrote:

Erik -

You write that adding a 'save' is difficult.
I can see it is involved, but don't quite see how it is specifically difficult.
The way I see it, every item that is added to a figure needs a method
to write itself to a file. So you loop through all lines, polygons,
and such, and write them to a file. I am sure you guys have thought
about this, and maybe have a much better approach.