Figure Saving in xcorrPickCorrection

Hi all,

I am using xcorrPickCorrection and I want the figures generated to be automatically saved. In the documentation provided this seems possible by supplying a filename within the command, however when I do this I get this error:

Traceback (most recent call last):
File “”, line 1, in
File “/apps/developers/libraries/python-libs/1.3/1/bit-64-canopy-1.5.2/lib/obspy/obspy/signal/”, line 428, in xcorrPickCorrection
File “/apps/developers/compilers/canopy/1.5.2/1/bit-64/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib/”, line 1476, in savefig
self.canvas.print_figure(*args, **kwargs)

TypeError: print_figure() takes at least 2 arguments (1 given)

This seems like there is problem with Obspy interfacing with matplotlib. Is there anyway around this problem?

Many thanks,

Rebecca Smith

Hi Rebecca

Out of curiosity, what format do you try to save to?

Note that matplotlib will try to deduce the format from the file extension of the filename you specify, hence if one format does not work it may be so that the proper backend is not installed (although if this is the case it would be nice with some more informative exception raised by matplotlib)



I mainly tried png format, but I tried pdf and jpeg as well just incase they worked. I always get the same error

from matplotlib though.


Rebecca, I can confirm, it's a bug coming through from matplotlib.

See and