pyyeti.cla.DR_Results.resp_plots

DR_Results.resp_plots(*, event=None, drms=None, inc0rb=True, fmt='pdf', onepdf=True, layout=(2, 3), figsize=(11, 8.5), cases=None, direc='resp_plots', tight_layout_args=None, legend_args=None, plot='plot', show_figures=False)[source]

Make time or frequency domain responses plots.

Parameters:
  • event (string or None; optional) – String for plot titles and file names (eg: ‘Liftoff’). If None, event is determined from, for example, self['SC_atm'].event

  • drms (list of data recovery categories or None; optional) – Data recovery categories to plot. If None, plot all available. See also input inc0rb.

  • inc0rb (bool; optional) – If True, the ‘_0rb’ versions of each data recovery category are automatically included.

  • fmt (string or None; optional) – If fmt == “pdf”, all plots are written to one PDF file, unless onepdf is set to False. If fmt is some other string, it is used as the format parameter in matplotlib.figure.Figure.savefig(). If None, no figures will be saved. Typical values for fmt are (from fig.canvas.get_supported_filetypes()):

    'eps': 'Encapsulated Postscript',
    'jpeg': 'Joint Photographic Experts Group',
    'jpg': 'Joint Photographic Experts Group',
    'pdf': 'Portable Document Format',
    'pgf': 'PGF code for LaTeX',
    'png': 'Portable Network Graphics',
    'ps': 'Postscript',
    'raw': 'Raw RGBA bitmap',
    'rgba': 'Raw RGBA bitmap',
    'svg': 'Scalable Vector Graphics',
    'svgz': 'Scalable Vector Graphics',
    'tif': 'Tagged Image File Format',
    'tiff': 'Tagged Image File Format'
    

    File naming conventions: if ‘SC_atm’ is a category, then example output filenames could be:

    'SC_atm_srs.pdf'
    'SC_atm_eqsine.pdf'
    'SC_atm_srs_0.png', 'SC_atm_srs_1.png', ...
    'SC_atm_eqsine_0.png', 'SC_atm_eqsine_1.png', ...
    
  • onepdf (bool or string; optional) – If onepdf evaluates to True and fmt is ‘pdf’, all plots are written to one PDF file where the name is:

    onepdf

    PDF file name

    string

    All plots saved in: onepdf + “.pdf”

    True

    All plots saved in: event + “_??.pdf”, where “??” is either ‘hist’, ‘psd’, or ‘frf’ as appropriate.

    If False, each figure is saved to its own file named as described above (see fmt).

  • layout (2-element tuple/list; optional) – Subplot layout, eg: (2, 3) for 2 rows by 3 columns

  • figsize (2-element tuple/list; optional) – Define page size in inches.

  • cases (tuple/list of case names to plot or None; optional) – If None, all cases are plotted.

  • direc (string; optional) – Directory name to put all output plot files; will be created if it doesn’t exist.

  • tight_layout_args (dict or None; optional) – Arguments for matplotlib.figure.Figure.tight_layout(). If None, defaults to:

    {
       "pad": 3.0,
       "w_pad": 2.0,
       "h_pad": 2.0,
       "rect": (0.3 / figsize[0],
                0.3 / figsize[1],
                1.0 - 0.3 / figsize[0],
                1.0 - 0.3 / figsize[1]),
    }
    
  • legend_args (dict or None; optional) – Arguments for matplotlib.axes.Axes.legend(). The internally set arguments for the legend call are:

    {
       "loc": "upper right",
       "bbox_to_anchor": (lx, ly),
       "fontsize": "small",
       "framealpha": 0.5,
    }
    

    If legend_args is a dictionary, it will update those default settings.

  • plot (string; optional) – The name of a function in matplotlib.axes.Axes that will draw each curve. Defaults to “plot”. Common options:

    plot

    “plot”

    “loglog”

    “semilogx”

    “semilogy”

  • show_figures (bool; optional) – If True, plot figures will be displayed on the screen for interactive viewing. Warning: there may be many figures.

Returns:

figs (list) – List of figure handles created by this routine.

Notes

This routine is an interface to the mk_plots() routine.

Set the onepdf parameter to a string to specify the name of the PDF file.

For example:

# write a pdf file to 'resp_plots/':
results.resp_plots()
# write png file(s) to 'png/':
results.resp_plots(fmt='png', direc='png')