class_docstr: !
  @brief Visualizer of output dynamic of syncpr network (Sync for Pattern Recognition).
class_docstr_tok: ["!","@","brief","Visualizer","of","output","dynamic","of","syncpr","network","(","Sync","for","Pattern","Recognition",")","."]
docstr: !
  @brief Displays evolution of phase oscillators as set of patterns where the last one means final result of recognition.
  
  @param[in] syncpr_output_dynamic (syncpr_dynamic): Output dynamic of a syncpr network.
  @param[in] image_height (uint): Height of the pattern (image_height * image_width should be equal to number of oscillators).
  @param[in] image_width (uint): Width of the pattern.
docstr_tok: ["!","@","brief","Displays","evolution","of","phase","oscillators","as","set","of","patterns","where","the","last","one","means","final","result","of","recognition",".","@","param","[","in","]","syncpr_output_dynamic","(","syncpr_dynamic",")",":","Output","dynamic","of","a","syncpr","network",".","@","param","[","in","]","image_height","(","uint",")",":","Height","of","the","pattern","(","image_height","*","image_width","should","be","equal","to","number","of","oscillators",")",".","@","param","[","in","]","image_width","(","uint",")",":","Width","of","the","pattern","."]
code: def show_pattern(syncpr_output_dynamic, image_height, image_width):
      """!
      @brief Displays evolution of phase oscillators as set of patterns where the last one means final result of recognition.
  
      @param[in] syncpr_output_dynamic (syncpr_dynamic): Output dynamic of a syncpr network.
      @param[in] image_height (uint): Height of the pattern (image_height * image_width should be equal to number of oscillators).
      @param[in] image_width (uint): Width of the pattern.
  
      """
      number_pictures = len(syncpr_output_dynamic)
      iteration_math_step = 1.0
      if number_pictures > 50:
          iteration_math_step = number_pictures / 50.0
          number_pictures = 50
  
      number_cols = int(numpy.ceil(number_pictures**0.5))
      number_rows = int(numpy.ceil(number_pictures / number_cols))
  
      real_index = 0, 0
      double_indexer = True
      if (number_cols == 1) or (number_rows == 1):
          real_index = 0
          double_indexer = False
  
      (figure, axarr) = plt.subplots(number_rows, number_cols)
  
      if number_pictures > 1:
          plt.setp([ax for ax in axarr], visible=False)
  
      iteration_display = 0.0
      for iteration in range(len(syncpr_output_dynamic)):
          if iteration >= iteration_display:
              iteration_display += iteration_math_step
  
              ax_handle = axarr
              if number_pictures > 1:
                  ax_handle = axarr[real_index]
  
              syncpr_visualizer.__show_pattern(
                  ax_handle,
                  syncpr_output_dynamic,
                  image_height,
                  image_width,
                  iteration,
              )
  
              if double_indexer is True:
                  real_index = real_index[0], real_index[1] + 1
                  if real_index[1] >= number_cols:
                      real_index = real_index[0] + 1, 0
              else:
                  real_index += 1
  
      plt.show()
      plt.close(figure)
  
imports: import math
  import cmath
  import numpy
  from pyclustering.nnet import solve_type, initial_type, conn_type, conn_represent
  from pyclustering.nnet.sync import sync_network, sync_dynamic, sync_visualizer
  import pyclustering.core.syncpr_wrapper
  from pyclustering.core.wrapper import ccore_library
  from PIL import Image
  import matplotlib.pyplot
  import matplotlib.animation
label_desc: Use image node_id 1 for calling the syncpr_visualizer obj's underlying member method code with example usage: obj.show_pattern(syncpr_output_dynamic, image_height, image_width) without return types