def plot(self):
        if self.tabWidget.count() == 0:
            return

        # Error if not enough slabs
        plotType = str(self.plotOptions.getPlotType())        
        if len(self.selectedVars) < 2 and self.requiresTwoSlabs(plotType):
            self.showError('Error Message to User', 'Vector, Scatter, Meshfill or XvsY plots \nmust have two data variables. The data \nvariables must be selected in the \n"Defined Variables" window.')
            return

        # Create & Update the graphics method / CDATCell vistrails modules
        # *** IMPORTANT ***
        # Everytime plot is pressed, this will create a new Graphics Method and
        # CDATCell Module. Instead it should ONLY create a new graphics method
        # and CDATCell module if the variable isn't already connected to an
        # existing Graphics Method / CDATCell module.  This results in plots 
        # being plotted multiple times.
        axisList = self.tabWidget.currentWidget()
        self.emit(QtCore.SIGNAL('createModule'), gm_name)
        self.emit(QtCore.SIGNAL('createModule'), cdatcell_name)        
        self.setVistrailsGraphicsMethod() 
        self.setVistrailsCDATCell()

        # Get the names of the 2 slabs so we can connect their modules in vistrails
        if self.requiresTwoSlabs(plotType):
            var1 = self.selectedVars[-1].id
            var2 = self.selectedVars[-2].id
        else:
            var1 = self.currentTabName()
            var2 = None

        # Emit signal to GuiController to connect ports and plot
        self.emit(QtCore.SIGNAL('plot'), var1, var2)

        # If a quickplot is plotted, define current variable under 'quickplot'
        if (self.currentTabName() == 'quickplot'):
            var = self.getUpdatedVar()
            self.emit(QtCore.SIGNAL('plotPressed'), axisList.getFile(), var)

        # Record plot teaching commands
        self.recordPlotTeachingCommand()
Create the graphics method and cdatcell modules. Update the input
dataset/ETHPy150Open VisTrails/VisTrails/contrib/cdat/cdat_window.py/QVariableView.plot