def get_stratplots_widgets(mainwindow=None):
    """Get the :class:`StraditizerWidgets` from the psyplot GUI mainwindow"""
    if mainwindow is None:
        from psyplot_gui.main import mainwindow
    if mainwindow is None:
        raise NotImplementedError('Not running in interactive psyplot GUI!')
    try:
        stratplots = mainwindow.plugins[
            'psy_strat.strat_widget:StratPlotsWidget:stratplots']
    except KeyError:
        raise KeyError('psy_strat not implemented as a GUI plugin!')
    return stratplots
