shaharkadmiel / pySW4

Setup, run, post process, and visualize numerical simulations. Primarily SW4
http://shaharkadmiel.github.com/pySW4
GNU General Public License v3.0
28 stars 14 forks source link

fix movie generation on newer matplotlib #8

Closed megies closed 7 years ago

megies commented 7 years ago

It seems that on newer matplotlib our code fails because Figure.savefig() doesn't accept a StringIO instance anymore.. need to double check..

/home/megies/anaconda/envs/pySW4/lib/python2.7/site-packages/pySW4/plotting/image.py:212: UserWarning: Failed to create a movie: unicode argument expected, got 'str'
  warnings.warn(msg)
(Pdb) n
> /home/megies/anaconda/envs/pySW4/lib/python2.7/site-packages/pySW4/plotting/image.py(109)image_files_to_movie()
-> fig.savefig(string_io, format='png')
(Pdb) n
TypeError: "unicode argument expected, got 'str'"
shaharkadmiel commented 7 years ago

Looks good to me. You can go ahead and merge this...