2

I'm trying to display the results of a simple function animated over time. There are many examples of this on matplotlib and stackoverflow (typical link below). All of these produce the same dysfunctionality: the axes appear, but the data doesn't: the content of the plot is blank. I'm literally copying and pasting tutorial code, so it seems likely to be a configuration issue, rather than a coding error.

A number of similar problems have been reported, but none of the answers seem to work. I'm on a current Mac with OSX 10.13.4, running python 3.6.5 and recently updated matplotlib. Per suggestions from other questions I've set up a Framework installation of python 3.6.5, straight from python.org. No change in behavior running outside or within a virtual environment (tried virtualenv and venv).

I haven't encountered problems with plots that don't attempt to animate - they work fine.

I've tried running many examples from the command line (bash), the PyCharm IDE, and in Jupyter, with same result (everything but animations works). There are no error messages except for examples that attempt to save images - those crash with a long error log (e.g. Animating "growing" line plot in Python/Matplotlib produces "ValueError: Invalid file object: <_io.BufferedReader name=65>" after pages of traceback). In such examples commenting out the save prevents the crash, but the plot remains empty.

Advice much appreciated.

  • I get the save error message with the linked example code and a Linux machine, too. i assume these two problems are unrelated and you should ask those two questions separately. – Mr. T May 19 '18 at 05:13

0 Answers0