def plot_lbp_model(ax, binary_values):
 theta = np.deg2rad(45)
 R = 1
 r = 0.15
 w = 1.5
 gray = '0.5'
 plot_circle(ax, (0, 0), radius=r, color=gray)
 for (i, facecolor) in enumerate(binary_values):
  x = (R * np.cos((i * theta)))
  y = (R * np.sin((i * theta)))
  plot_circle(ax, (x, y), radius=r, color=str(facecolor))
 for x in np.linspace((- w), w, 4):
  ax.axvline(x, color=gray)
  ax.axhline(x, color=gray)
 ax.axis('image')
 ax.axis('off')
 size = (w + 0.2)
 ax.set_xlim((- size), size)
 ax.set_ylim((- size), size)

def plot_lbp_model ( ax , binary_values ) : theta = np . deg2rad ( 45 ) R = 1 r = 0.15 w = 1.5 gray = '0.5' plot_circle ( ax , ( 0 , 0 ) , radius = r , color = gray ) for ( i , facecolor ) in enumerate ( binary_values ) : x = ( R * np . cos ( ( i * theta ) ) ) y = ( R * np . sin ( ( i * theta ) ) ) plot_circle ( ax , ( x , y ) , radius = r , color = str ( facecolor ) ) for x in np . linspace ( ( - w ) , w , 4 ) : ax . axvline ( x , color = gray ) ax . axhline ( x , color = gray ) ax . axis ( 'image' ) ax . axis ( 'off' ) size = ( w + 0.2 ) ax . set_xlim ( ( - size ) , size ) ax . set_ylim ( ( - size ) , size )
draw the schematic for a local binary pattern .