Scaling issues plotting a single trace in a section plot

Hi

There seems to be a scaling issue if plotting a stream object containing a single trace using the section type plot.

At present I have obspy 1.1.1 installed so if anyone could confirm the issue on the latest version I’ll file a bug report (also appreciate if there’s a work around available)

The issue can be reproduced using the attached file and the code snippet:

from obspy.core import read
tr = read("wf1.mseed")
tr[0].stats.distance = 1000
tr.plot(type='section')

Note, if the same waveform is read in twice and offset by some distance the scaling works fine, e.g.

from obspy.core import read
tr = read("wf1.mseed")
tr[0].stats.distance = 1000
tr += read("wf1.mseed")
tr[1].stats.distance = 1001
tr.plot(type='section')

Scales properly, but does not really qualify as a work around

\p

När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/ E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy

wf1.mseed (56 KB)

Hi

A colleague of mine confirmed the issue using obspy 1.2.1 so I’ve filed a bug report on github.

But, if anyone with some more insight into the code behind the scene’s has some idea of a workaround I’d appreciate a pointer (had a quick look my-self but sort of got lost among the classes with compass).

\p