Ist there a way to plot all traces of a stream in one subplot with same / different colours / symbols?

Regards,

Dirk

Ist there a way to plot all traces of a stream in one subplot with same / different colours / symbols?

Regards,

Dirk

Here comes the answer to my own questions:

figure()

for i in range(cnt):

t=np.linspace(0,st[i].stats.endtime-st[i].stats.starttime, (st[i].stats.endtime-st[i].stats.starttime+st[0].stats.delta)*st[0].stats.sampling_rate,endpoint=True)

plt.plot(t,st[i].data)

Dirk

Yes, for all custom plotting needs beyond a simple preview, directly

using matplotlib is the way to go.

Of course you should consider the possibility of differing start times

of the traces.. simply starting at 0 for each one might not plot

correctly aligned. also, always taking the sampling rate of the first

trace is not failsafe.

To ensure all traces have the same start time you could trim with

filling masked values.. e.g.:

st.trim(starttime=t0, pad=True, fill_value=None)

Furthermore, there's a convenience routine to get relative sample times

in a Trace, so you could do something like:

Here's an example with a modified stream with differing sampling rates

and starttimes to show what I mean:

Hi all,

Is there a way to downsample a trace by a float factor?

tr.decimate(factor) # takes factor as int

Thank you in advance,

Nikos

Thank you Tobias,

The problem is that at the description of the function is says that "Fourier method is used, the signal is assumed to be periodic".

And I'm not sure if this should be assumed for a seismogram.

Nikos