frecuency_plot.py
def barplot(self):
        '''
        

        Method to plot the frecuency of occurrence of each unique value
        -------
        Args: 
            None
        
        Returns: 
            ax object: bar plot of the ratio variable
        '''

        temp = self.ratio.head(self.n_bars)
        plt.figure(figsize = self.size)
        ax = sb.barplot(temp.values, temp.index, orient='h', color = self.color)
        plt.title(self.title, fontsize = 18, loc = 'left', pad = 20)


        #Remove plot frame
        ax.spines['top'].set_visible(False)
        ax.spines['right'].set_visible(False)
        ax.spines['left'].set_visible(False)

        #Draw y grid below the bars
        ax.set_axisbelow(True)
        ax.grid(axis='x')

        #Introducte percentages
        for p in ax.patches:
            width = p.get_width()
            height = p.get_height()
            x, y = p.get_xy()
            ax.annotate( f'{width:.1%}', (0.5*width, y + height/1.6),
                        ha='right')

        return ax

        

        Method to plot the frecuency of occurrence of each unique value
        -------
        Args: 
            None
        
        Returns: 
            ax object: bar plot of the ratio variable
        
Method to plot the frecuency of occurrence of each unique value

None

ax object: bar plot of the ratio variable
Method to plot the frecuency of occurrence of each unique value None ax object : bar plot of the ratio variable
def barplot(self):
        temp = self.ratio.head(self.n_bars)
        plt.figure(figsize = self.size)
        ax = sb.barplot(temp.values, temp.index, orient='h', color = self.color)
        plt.title(self.title, fontsize = 18, loc = 'left', pad = 20)
        ax.spines['top'].set_visible(False)
        ax.spines['right'].set_visible(False)
        ax.spines['left'].set_visible(False)
        ax.set_axisbelow(True)
        ax.grid(axis='x')
        for p in ax.patches:
            width = p.get_width()
            height = p.get_height()
            x, y = p.get_xy()
            ax.annotate( f'{width:.1%}', (0.5*width, y + height/1.6),
                        ha='right')
        return ax
def barplot ( self ) : temp = self . ratio . head ( self . n_bars ) plt . figure ( figsize = self . size ) ax = sb . barplot ( temp . values , temp . index , orient = 'h' , color = self . color ) plt . title ( self . title , fontsize = 18 , loc = 'left' , pad = 20 ) ax . spines [ 'top' ] . set_visible ( False ) ax . spines [ 'right' ] . set_visible ( False ) ax . spines [ 'left' ] . set_visible ( False ) ax . set_axisbelow ( True ) ax . grid ( axis = 'x' ) for p in ax . patches : width = p . get_width ( ) height = p . get_height ( ) x , y = p . get_xy ( ) ax . annotate ( f'{width:.1%}' , ( 0.5 * width , y + height / 1.6 ) , ha = 'right' ) return ax
Method to plot the frecuency of occurrence of each unique value
Method to plot the frecuency of occurrence of each unique value
'''
        

        Method to plot the frecuency of occurrence of each unique value
        -------
        Args: 
            None
        
        Returns: 
            ax object: bar plot of the ratio variable
        ''' #Remove plot frame
 #Draw y grid below the bars
 #Introducte percentages

self