parameters: (self, figsize=(5, 2))
docstring: Plots the sampling count history for each strategy profile.
docstring_summary: Plots the sampling count history for each strategy profile.
docstring_tokens: Plots the sampling count history for each strategy profile .
function: def visualise_count_history(self, figsize=(5, 2)):
      """Plots the sampling count history for each strategy profile."""
      plt.figure(figsize=figsize)
      data = []
      labels = []
      for v in self.V:
        print(v)
        labels.append(v)
        data.append(self.count_history[v])
      pal = plt.get_cmap('Dark2').colors
      plt.stackplot(
          np.arange(1, self.total_interactions + 1),
          np.array(data),
          labels=labels,
          colors=pal)
      plt.ylim(top=1, bottom=0)
      plt.xlabel('Interactions')
      plt.ylabel('Proportions')
  
      # Shrink current axis
      ax = plt.gca()
      ax.xaxis.set_ticks_position('bottom')
      ax.yaxis.set_ticks_position('left')
      box = ax.get_position()
      ax.set_position([box.x0, box.y0, box.width * 0.67, box.height])
      plt.xlim(1, self.total_interactions)
      plt.legend(loc='center left', bbox_to_anchor=(1, 0.5), ncol=1)
function_tokens: def visualise_count_history ( self , figsize = ( 5 , 2 ) ) : plt . figure ( figsize = figsize ) data = [ ] labels = [ ] for v in self . V : print ( v ) labels . append ( v ) data . append ( self . count_history [ v ] ) pal = plt . get_cmap ( 'Dark2' ) . colors plt . stackplot ( np . arange ( 1 , self . total_interactions + 1 ) , np . array ( data ) , labels = labels , colors = pal ) plt . ylim ( top = 1 , bottom = 0 ) plt . xlabel ( 'Interactions' ) plt . ylabel ( 'Proportions' ) # Shrink current axis ax = plt . gca ( ) ax . xaxis . set_ticks_position ( 'bottom' ) ax . yaxis . set_ticks_position ( 'left' ) box = ax . get_position ( ) ax . set_position ( [ box . x0 , box . y0 , box . width * 0.67 , box . height ] ) plt . xlim ( 1 , self . total_interactions ) plt . legend ( loc = 'center left' , bbox_to_anchor = ( 1 , 0.5 ) , ncol = 1 )