@_log<EOL><INDENT>def gradient_plots(self, analytes=None, win=<NUM_LIT:15>, samples=None, ranges=False,<EOL>focus=None, outdir=None,<EOL>figsize=[<NUM_LIT:10>, <NUM_LIT:4>], subset='<STR_LIT>'):<DEDENT>
if focus is None:<EOL><INDENT>focus = self.focus_stage<EOL><DEDENT>if outdir is None:<EOL><INDENT>outdir = self.report_dir + '<STR_LIT:/>' + focus + '<STR_LIT>'<EOL><DEDENT>if not os.path.isdir(outdir):<EOL><INDENT>os.mkdir(outdir)<EOL><DEDENT>if subset is not None:<EOL><INDENT>samples = self._get_samples(subset)<EOL><DEDENT>elif samples is None:<EOL><INDENT>samples = self.subsets['<STR_LIT>']<EOL><DEDENT>elif isinstance(samples, str):<EOL><INDENT>samples = [samples]<EOL><DEDENT>with self.pbar.set(total=len(samples), desc='<STR_LIT>') as prog:<EOL><INDENT>for s in samples:<EOL><INDENT>f, a = self.data[s].gplot(analytes=analytes, win=win, figsize=figsize,<EOL>ranges=ranges, focus_stage=focus)<EOL>f.savefig(outdir + '<STR_LIT:/>' + s + '<STR_LIT>')<EOL>plt.close(f)<EOL>prog.update()<EOL><DEDENT><DEDENT>return<EOL>
Plot analyte gradients as a function of time.

Parameters
----------
analytes : optional, array_like or str
    The analyte(s) to plot. Defaults to all analytes.
samples: optional, array_like or str
    The sample(s) to plot. Defaults to all samples.
ranges : bool
    Whether or not to show the signal/backgroudn regions
    identified by 'autorange'.
focus : str
    The focus 'stage' of the analysis to plot. Can be
    'rawdata', 'despiked':, 'signal', 'background',
    'bkgsub', 'ratios' or 'calibrated'.
outdir : str
    Path to a directory where you'd like the plots to be
    saved. Defaults to 'reports/[focus]' in your data directory.
filt : str, dict or bool
    Either logical filter expression contained in a str,
    a dict of expressions specifying the filter string to
    use for each analyte or a boolean. Passed to `grab_filt`.
scale : str
    If 'log', plots the data on a log scale.
figsize : array_like
    Array of length 2 specifying figure [width, height] in
    inches.
stats : bool
    Whether or not to overlay the mean and standard deviations
    for each trace.
stat, err: str
    The names of the statistic and error components to plot.
    Deafaults to 'nanmean' and 'nanstd'.


Returns
-------
None