PEATDB/TablePlot.py
def plotXY(cls, x, y, title='',xlabel=None,ylabel=None):
        """Do xy plot of 2 lists and show correlation"""
        
        if cls.xscale == 1:
            if cls.yscale == 1:
                plotfig = pylab.loglog(x, y, cls.shape)
            else:    
                plotfig = pylab.semilogx(x, y, cls.shape)    
        elif cls.yscale == 1:
            plotfig = pylab.semilogy(x, y, cls.shape) 
        else:                    
            plotfig = pylab.plot(x, y, cls.shape)
        pylab.title(title)
        pylab.xlabel(xlabel)
        pylab.ylabel(ylabel)
        #legend
        cls.legendlines.append(plotfig)
        cls.legendnames.append('A')
        if cls.showlegend == 1:
            pylab.legend(cls.legendlines,cls.legendnames,shadow=True,
                         numpoints=1,loc=cls.legendloc)        
        if cls.grid == 1:
            print 'cls.grid',cls.grid
            pylab.grid(True)
        
        return plotfig
Do xy plot of 2 lists and show correlation
Do xy plot of 2 lists and show correlation
Do xy plot of 2 lists and show correlation
def plotXY(cls, x, y, title='',xlabel=None,ylabel=None):
        if cls.xscale == 1:
            if cls.yscale == 1:
                plotfig = pylab.loglog(x, y, cls.shape)
            else:    
                plotfig = pylab.semilogx(x, y, cls.shape)    
        elif cls.yscale == 1:
            plotfig = pylab.semilogy(x, y, cls.shape) 
        else:                    
            plotfig = pylab.plot(x, y, cls.shape)
        pylab.title(title)
        pylab.xlabel(xlabel)
        pylab.ylabel(ylabel)
        cls.legendlines.append(plotfig)
        cls.legendnames.append('A')
        if cls.showlegend == 1:
            pylab.legend(cls.legendlines,cls.legendnames,shadow=True,
                         numpoints=1,loc=cls.legendloc)        
        if cls.grid == 1:
            print 'cls.grid',cls.grid
            pylab.grid(True)
        return plotfig
def plotXY ( cls , x , y , title = '' , xlabel = None , ylabel = None ) : if cls . xscale == 1 : if cls . yscale == 1 : plotfig = pylab . loglog ( x , y , cls . shape ) else : plotfig = pylab . semilogx ( x , y , cls . shape ) elif cls . yscale == 1 : plotfig = pylab . semilogy ( x , y , cls . shape ) else : plotfig = pylab . plot ( x , y , cls . shape ) pylab . title ( title ) pylab . xlabel ( xlabel ) pylab . ylabel ( ylabel ) cls . legendlines . append ( plotfig ) cls . legendnames . append ( 'A' ) if cls . showlegend == 1 : pylab . legend ( cls . legendlines , cls . legendnames , shadow = True , numpoints = 1 , loc = cls . legendloc ) if cls . grid == 1 : print 'cls.grid' , cls . grid pylab . grid ( True ) return plotfig
Do xy plot of 2 lists and show correlation
Do xy plot of 2 lists and show correlation
"""Do xy plot of 2 lists and show correlation""" #legend
cls
x
y
title
xlabel
ylabel