util/plotfig.py
def _scatter_plotting(self, array1, array2, xlabel='', ylabel='', colors = ['red'], xlim = None, ylim = None):
            """
            Plot scatter map among several group's data
            ----------------------------------------------
            Parameters:
                array1: axis x data. m*n arrays, n means different groups
                array2: axis y data. array2 should have same shape with array1
                xlabel: xlabel
                ylabel: ylabel
                colors: color of each group
                xlim: axis x limitation, [xmin, xmax]
                ylim: axis y limitation, [ymin, ymax]
            Example:
                >>> plotscatter(array1, array2)
            """
            if isinstance(array1, list):
                array1 = np.array(array1)
            if isinstance(array2, list):
                array2 = np.array(array2)
            if array1.ndim == 1:
                array1 = np.expand_dims(array1, axis=1)
            if array2.ndim == 1:
                array2 = np.expand_dims(array2, axis=1)
            assert array1.shape == array2.shape, 'arrays shape should be equal'
            assert array1.shape[1] == len(colors), 'data class need to be equal with color class'
            for i,c in enumerate(colors):
                plt.scatter(array1[:,i], array2[:,i], color = c)
            plt.xlabel(xlabel)
            plt.ylabel(ylabel)
            if xlim is not None:
                plt.xlim(xlim)
            if ylim is not None:
                plt.ylim(ylim)

            if self._isshow is True:
                plt.show()

            Plot scatter map among several group's data
            ----------------------------------------------
            Parameters:
                array1: axis x data. m*n arrays, n means different groups
                array2: axis y data. array2 should have same shape with array1
                xlabel: xlabel
                ylabel: ylabel
                colors: color of each group
                xlim: axis x limitation, [xmin, xmax]
                ylim: axis y limitation, [ymin, ymax]
            Example:
                >>> plotscatter(array1, array2)
            
Plot scatter map among several group's data
Plot scatter map among several group ' s data
def _scatter_plotting(self, array1, array2, xlabel='', ylabel='', colors = ['red'], xlim = None, ylim = None):
            if isinstance(array1, list):
                array1 = np.array(array1)
            if isinstance(array2, list):
                array2 = np.array(array2)
            if array1.ndim == 1:
                array1 = np.expand_dims(array1, axis=1)
            if array2.ndim == 1:
                array2 = np.expand_dims(array2, axis=1)
            assert array1.shape == array2.shape, 'arrays shape should be equal'
            assert array1.shape[1] == len(colors), 'data class need to be equal with color class'
            for i,c in enumerate(colors):
                plt.scatter(array1[:,i], array2[:,i], color = c)
            plt.xlabel(xlabel)
            plt.ylabel(ylabel)
            if xlim is not None:
                plt.xlim(xlim)
            if ylim is not None:
                plt.ylim(ylim)
            if self._isshow is True:
                plt.show()
def _scatter_plotting ( self , array1 , array2 , xlabel = '' , ylabel = '' , colors = [ 'red' ] , xlim = None , ylim = None ) : if isinstance ( array1 , list ) : array1 = np . array ( array1 ) if isinstance ( array2 , list ) : array2 = np . array ( array2 ) if array1 . ndim == 1 : array1 = np . expand_dims ( array1 , axis = 1 ) if array2 . ndim == 1 : array2 = np . expand_dims ( array2 , axis = 1 ) assert array1 . shape == array2 . shape , 'arrays shape should be equal' assert array1 . shape [ 1 ] == len ( colors ) , 'data class need to be equal with color class' for i , c in enumerate ( colors ) : plt . scatter ( array1 [ : , i ] , array2 [ : , i ] , color = c ) plt . xlabel ( xlabel ) plt . ylabel ( ylabel ) if xlim is not None : plt . xlim ( xlim ) if ylim is not None : plt . ylim ( ylim ) if self . _isshow is True : plt . show ( )
Plot scatter map among several group's data
Plot scatter map among several group ' s data
"""
            Plot scatter map among several group's data
            ----------------------------------------------
            Parameters:
                array1: axis x data. m*n arrays, n means different groups
                array2: axis y data. array2 should have same shape with array1
                xlabel: xlabel
                ylabel: ylabel
                colors: color of each group
                xlim: axis x limitation, [xmin, xmax]
                ylim: axis y limitation, [ymin, ymax]
            Example:
                >>> plotscatter(array1, array2)
            """
self
array1
axis x data. m*n arrays, n means different groups
axis x data . m * n arrays n means different groups
array2
axis y data. array2 should have same shape with array1
axis y data . array2 should have same shape with array1
xlabel
None
ylabel
None
colors
color of each group
color of each group
xlim
axis x limitation, [xmin, xmax]
axis x limitation [ xmin xmax ]
ylim
axis y limitation, [ymin, ymax]
axis y limitation [ ymin ymax ]
examples
>>> plotscatter(array1, array2)
>>> plotscatter ( array1 array2 )