[obspy-users] dayplot type

Kress V. kress at u.washington.edu
Tue Nov 29 17:45:21 CET 2011


The dayplot function did not work for us out of the box either.  I could be wrong, but it looked like it had not been completely finished (coder moved on to more pressing projects) as some of the mathplotlib function calls were similar to existing calls, but not quite correct.  I did some fairly extensive rewrite and we have a working version.  I submitted an earlier version, but we have made several enhancements since.  I would be happy to share what we have.

-Victor
  
On Nov 29, 2011, at 8:14 AM, 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.
> 
> -- 
> ---------------------------------------------------
> Mickael LANGLAIS
> 
> Institut des Sciences de la Terre - ISTerre
> Université de Grenoble/CNRS
> BP 53 - 38041 Grenoble cedex 9 - FRANCE
> 
> Tel +33 (0)4 76 63 51 73
> Fax +33 (0)4 76 63 52 52
> 
> http://www.isterre.fr
> http://www-rap.obs.ujf-grenoble.fr
> http://www-lgit.obs.ujf-grenoble.fr/users/mlanglai/
> ---------------------------------------------------
> 
> 
> _______________________________________________
> obspy-users mailing list
> obspy-users at lists.sevor.de
> http://lists.obspy.org/cgi-bin/mailman/listinfo/obspy-users

Victor Kress
Pacific Northwest Seismic Laboratory







More information about the obspy-users mailing list