def setup_figure(self):
     BaseRaster2DSlowScan.setup_figure(self)
     self.set_details_widget(widget=self.settings.New_UI(
         include=['h_axis', 'v_axis']))
    def setup_figure(self):
        # Details widgets
        details_layout = self.ui.details_groupBox.layout()

        meas_widget = self.settings.New_UI(include=[
            'counting_device',
            'auto_HistogramBins',
            'acq_mode',
        ])
        details_layout.addWidget(meas_widget)

        self.sig_cts_widget = self.settings.New_UI(
            include=['sig_cts', 'dark_counts'])
        self.sig_cts_widget.hide()
        details_layout.addWidget(self.sig_cts_widget)

        if hasattr(self, 'shutter_open'):
            widget = self.settings.New_UI(
                include=['use_shutter', 'dark_histograms_accumulations'])
            details_layout.addWidget(widget)
            self.settings.use_shutter.change_readonly(False)
        else:
            self.settings['use_shutter'] = False
            self.settings.use_shutter.change_readonly(True)

        # Hardware widgets
        self.hw_widgets = {}
        try:
            ph_widget = self.app.hardware['picoharp'].settings.New_UI(
                include=['connected', 'Tacq', 'Binning'])
            self.ui.device_details_GroupBox.layout().addWidget(ph_widget)
            self.hw_widgets.update({'picoharp': ph_widget})
        except:
            pass

        try:
            hh_widget = self.app.hardware['hydraharp'].settings.New_UI(
                include=[
                    'connected', 'Tacq', 'ChanEnable0', 'ChanEnable1',
                    'Binning', 'HistogramBins', 'SyncDivider'
                ])
            self.ui.device_details_GroupBox.layout().addWidget(hh_widget)
            self.hw_widgets.update({'hydraharp': hh_widget})
            ph_widget.hide()
        except:
            pass

        self.settings.counting_device.change_choice_list(
            self.hw_widgets.keys())
        self.settings.counting_device.add_listener(
            self.on_change_counting_device)
        self.settings.acq_mode.add_listener(self.on_change_acq_mode)

        # Plots
        BaseRaster2DSlowScan.setup_figure(self)
        self.graph_layout.nextRow()
        self.lifetime_plot = self.graph_layout.addPlot(colspan=2)
        #self.lifetime_plot.setMinimumHeight(300)
        self.lifetime_plot.setLabel('left', 'counts')
        self.lifetime_plot.setLabel('bottom',
                                    'time',
                                    units='s',
                                    unitPrefix=None)
        self.lifetime_plot.setLogMode(False, True)