[matplotlib-devel] Bug report: _make_movie hanging waiting for ffmpeg

2012-03-14 Thread Stephane Gagnon
Hi,

while trying out animation.ArtistAnimation, my script would not
terminate.  The .mp4 file was generated and later found out that the
script would block at proc.wait() within _make_movie.  ffmpeg
generates quite a bit of text and it seems that if stdout/stderr are
not closed, wait() does not return (this is on Windows).  I have made
some modifications to animation.py to get it to work, but can't tell
how this will behave on other platforms.


Proposed change in matplotlib/animation.py:

def _make_movie(self, fname, fps, codec, frame_prefix, cmd_gen=None):
# Uses subprocess to call the program for assembling frames into a
# movie file.  *cmd_gen* is a callable that generates the sequence
# of command line arguments from a few configuration options.
from subprocess import Popen, PIPE
if cmd_gen is None:
cmd_gen = self.ffmpeg_cmd
command = cmd_gen(fname, fps, codec, frame_prefix)
verbose.report('Animation._make_movie running command: %s'%'
'.join(command))
proc = Popen(command, shell=False,
stdout=PIPE, stderr=PIPE)
+  proc.stdout.close()
+  proc.stderr.close()
proc.wait()

This was tested to work with the configuration below.

OS: Windows 7
Python Version: Python 2.7.2 |EPD 7.2-1 (32-bit)| (default, Sep 14
2011, 11:02:05) [MSC v.1500 32 bit (Intel)]
Matplotlib version: 1.1.0
ffmpeg version N-38622-g1eabd71

Best regards

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Bug report: _make_movie hanging waiting for ffmpeg

2012-03-14 Thread Ryan May
On Tue, Mar 13, 2012 at 10:43 PM, Stephane Gagnon
 wrote:
> while trying out animation.ArtistAnimation, my script would not
> terminate.  The .mp4 file was generated and later found out that the
> script would block at proc.wait() within _make_movie.  ffmpeg
> generates quite a bit of text and it seems that if stdout/stderr are
> not closed, wait() does not return (this is on Windows).  I have made
> some modifications to animation.py to get it to work, but can't tell
> how this will behave on other platforms.
>
>
> Proposed change in matplotlib/animation.py:
>
> def _make_movie(self, fname, fps, codec, frame_prefix, cmd_gen=None):
> # Uses subprocess to call the program for assembling frames into a
> # movie file.  *cmd_gen* is a callable that generates the sequence
> # of command line arguments from a few configuration options.
> from subprocess import Popen, PIPE
> if cmd_gen is None:
> cmd_gen = self.ffmpeg_cmd
> command = cmd_gen(fname, fps, codec, frame_prefix)
> verbose.report('Animation._make_movie running command: %s'%'
> '.join(command))
> proc = Popen(command, shell=False,
> stdout=PIPE, stderr=PIPE)
> +      proc.stdout.close()
> +      proc.stderr.close()
> proc.wait()

Thanks for the report. The code to write movie files has been
refactored substantially to improve a wide variety of problems. One
changes has been to use communicate() instead of wait(), both to get
stdout and stderr text, but also to fix a similar problem on linux.
Can you try replacing the close() and wait() calls with just a single
call to communicate() and see if that also fixes your problem?

Thanks,

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] colorbar extensions

2012-03-14 Thread Andrew Dawson
I implemented a new feature for colorbars, allowing the user to control the
length of the triangular extensions at either end. This is useful for
making plots consistent with those produced with other graphics packages.

The URL for the comparison is:

http://github.com/ajdawson/matplotlib/compare/master...colorbar-extensions

I think this is a useful feature, I hope it can be included. Let me know
when/if I need to do anything else.

Cheers,
Andrew
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] colorbar extensions

2012-03-14 Thread John Hunter
On Wed, Mar 14, 2012 at 2:44 PM, Andrew Dawson  wrote:

> I implemented a new feature for colorbars, allowing the user to control
> the length of the triangular extensions at either end. This is useful for
> making plots consistent with those produced with other graphics packages.
>
> The URL for the comparison is:
>
> http://github.com/ajdawson/matplotlib/compare/master...colorbar-extensions
>
> I think this is a useful feature, I hope it can be included. Let me know
> when/if I need to do anything else.
>
>
Typically, these changes are submitted as a github pull request.

http://matplotlib.sourceforge.net/devel/gitwash/development_workflow.html#asking-for-your-changes-to-be-merged-into-the-main-repo

JDH
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] test images update

2012-03-14 Thread Benjamin Root
So, I just tried running the test suite on matplotlib and it came back with
70+ failures.  I personally don't have the time or the focus to go through
them all, but I suspect most if not all are related to some "snapping"
fixes as most of the diff images seem to be related to changes in the graph
borders and slight changes in text placement.  Maybe it would be useful to
come up with a tool that could process through the result_images directory
and display the images and their diffs and help us replace the images we
deem as acceptable (or bump thresholds if we don't want to replace the
image).

What do others think? Maybe someone already has such a script?

Ben Root
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Different alphas for patch edges and faces

2012-03-14 Thread Tony Yu
Is it possible to set different alpha values for patch edges and faces?

I found an old thread on this
topic.
It seems like there was some general agreement about the design. Was there
any progress on the implementation?

Thanks,
-Tony
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel