Exemplo n.º 1
0
    def getIntervals(self):
        '''Plots a histogram of the time interval length between consecutive
        counts.'''

        #check if data has been imported. if not, give a warning
        if self.dataSet:

            #ask for the number of bins for the histogram
            labelText = "Enter the desired number of bins in the histogram"
            numBins = tksd.askinteger("Intervals Histogram", labelText, parent=self.root, minvalue=1)
            if not numBins:
                return

            #plot the histogram in matplotlib
            pd.plotHistOfIntervals(self.dataSet, numBins)

        else:
            self.showImportAlert()