Plotting¶
This submodule specializes the usual pyplot.plot function to be used as methods with Waveform objects.
- GWFrames.plot.plotWaveform(this, WaveformPart='Abs', Modes=(), t_fid=None, *pyplot_args, **pyplot_kwargs)¶
Plot some part of the modes of a Waveform against time.
Importing
GWFrames.plotattaches this function toWaveformandPNWaveformas the methodplot, so that it is called as, for example,>>> import GWFrames.plot >>> W.plot('Abs', Modes=[[2,2], [2,-2]], c='r')
which plots the magnitudes of the (2, 2) and (2, -2) modes of
Win red.- Parameters:
WaveformPart (
str, default'Abs') – The part of the data to plot: one of'Abs','LogAbs','LogLogAbs','Arg','ArgUnwrapped','Re', or'Im'. TheLogforms use logarithmic axes.Modes (
intorsequence, optional) – The modes to plot, given as a single mode index, as one[ell, m]pair, or as a sequence of such pairs. If empty (the default), all modes are plotted.t_fid (
float, optional) – For'ArgUnwrapped', the phases are shifted by multiples of \(2\pi\) so that they lie between 0 and \(2\pi\) at the first time step aftert_fid.*pyplot_args – Passed on to
matplotlib.pyplot.plot(orsemilogyorloglog). The legend label of each line is set to its \((\ell, m)\) automatically, unless a single line is plotted and alabelis given.**pyplot_kwargs – Passed on to
matplotlib.pyplot.plot(orsemilogyorloglog). The legend label of each line is set to its \((\ell, m)\) automatically, unless a single line is plotted and alabelis given.
- Returns:
listofmatplotlib.lines.Line2D– The lines plotted.