[obspy-users] dayplot type

Tobias Megies tobias.megies at geophysik.uni-muenchen.de
Tue Nov 29 17:37:38 CET 2011


Hi Mickael,

this looks like a bug to me that was fixed in revision 2714
(http://obspy.org/changeset/2714/obspy). I think for the moment you
would have to use the developer version of obspy.imaging (e.g. doing
easy_install -U obspy.imaging==dev; see install instructions on the
homepage.).

best,
Tobias

Mickaël LANGLAIS wrote:
> Dear All,
> 
> I am a beginner with python and I am interested in using obspy.
> I have tested several functions offered by obspy with success but I have
> some difficulties with the dayplot type in plot function. (obspy.core).
> I tried the examples found on the wiki with out success.
> I get this error message :
>> In [29]: st.plot(type='dayplot')
>> ---------------------------------------------------------------------------
>>
>> AttributeError                            Traceback (most recent call
>> last)
>>
>> /data/LOGICIELS/scripts-python/test-psd-python/TestSite/DATA/FR/OGDI/<ipython
>> console> in <module>()
>>
>> /usr/lib/python2.7/site-packages/obspy.core-0.4.8-py2.7.egg/obspy/core/stream.pyc
>> in plot(self, *args, **kwargs)
>>     779             raise
>>     780         waveform = WaveformPlotting(stream=self, *args, **kwargs)
>> --> 781         return waveform.plotWaveform()
>>     782
>>     783     def spectrogram(self, *args, **kwargs):
>>
>> /usr/lib/python2.7/site-packages/obspy.imaging-0.4.7-py2.7.egg/obspy/imaging/waveform.pyc
>> in plotWaveform(self, *args, **kwargs)
>>     162             self.plot(*args, **kwargs)
>>     163         elif self.type == 'dayplot':
>> --> 164             self.plotDay(*args, **kwargs)
>>     165         self.fig.canvas.draw()
>>     166         # The following just serves as a unified way of saving
>> and displaying
>>
>>
>> /usr/lib/python2.7/site-packages/obspy.imaging-0.4.7-py2.7.egg/obspy/imaging/waveform.pyc
>> in plotDay(self, *args, **kwargs)
>>     319                                                            %
>> len(self.color)])
>>     320         # Set ranges.
>>
>> --> 321         ax.xlim(0, self.width - 1)
>>     322         ax.ylim(-0.3 , self.steps + 0.3)
>>     323         self.axis = [ax]
>>
>> AttributeError: 'AxesSubplot' object has no attribute 'xlim
> 
> 
> Is anybody know how to solve this issue?
> 
> I found in the archive list some post about dayplot type bugs but can't
> find the solution to my problem.
> 
> Best regards
> Mickael.
> 

-- 
Dipl.-Geophys. Tobias Megies

Geophysikalisches Observatorium
Ludwigshöhe 8
82256 Fürstenfeldbruck

Ludwig-Maximilians-Universität
Department für Geo- und Umweltwissenschaften
Sektion Geophysik
Theresienstrasse 41/IV
80333 München

Tel: +49 (0) 89 2180-73981
     +49 (0) 89 2180-4326
Mail: tobias.megies at geophysik.uni-muenchen.de




More information about the obspy-users mailing list