class_docstr: !
  @brief Genetic algorithm visualizer is used to show clustering results that are specific for
          this particular algorithm: clusters, evolution of global and local optimum.
  @details The visualizer requires 'ga_observer' that collects evolution of clustering process in
            genetic algorithm. The observer is created by user and passed to genetic algorithm. There
            is usage example of the visualizer using the observer:
  @code
      from pyclustering.cluster.ga import genetic_algorithm, ga_observer, ga_visualizer
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import SIMPLE_SAMPLES
  
  
      # Read data for clustering
      sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE1)
  
      # Create instance of observer that will collect all information:
      observer_instance = ga_observer(True, True, True)
  
      # Create genetic algorithm where observer will collect information:
      ga_instance = genetic_algorithm(data=sample,
                                      count_clusters=2,
                                      chromosome_count=20,
                                      population_count=20,
                                      count_mutation_gens=1,
                                      observer=observer_instance)
  
      # Start processing
      ga_instance.process()
  
      # Obtain results
      clusters = ga_instance.get_clusters()
  
      # Print cluster to console
      print("Amount of clusters: '%d'. Clusters: '%s'" % (len(clusters), clusters))
  
      # Show cluster using observer:
      ga_visualizer.show_clusters(sample, observer_instance)
  @endcode
  
  @see cluster_visualizer
class_docstr_tok: ["!","@","brief","Genetic","algorithm","visualizer","is","used","to","show","clustering","results","that","are","specific","for","this","particular","algorithm",":","clusters",",","evolution","of","global","and","local","optimum",".","@","details","The","visualizer","requires","'ga_observer","'","that","collects","evolution","of","clustering","process","in","genetic","algorithm",".","The","observer","is","created","by","user","and","passed","to","genetic","algorithm",".","There","is","usage","example","of","the","visualizer","using","the","observer",":","@","code","from","pyclustering.cluster.ga","import","genetic_algorithm",",","ga_observer",",","ga_visualizer","from","pyclustering.utils","import","read_sample","from","pyclustering.samples.definitions","import","SIMPLE_SAMPLES","#","Read","data","for","clustering","sample","=","read_sample","(","SIMPLE_SAMPLES.SAMPLE_SIMPLE1",")","#","Create","instance","of","observer","that","will","collect","all","information",":","observer_instance","=","ga_observer","(","True",",","True",",","True",")","#","Create","genetic","algorithm","where","observer","will","collect","information",":","ga_instance","=","genetic_algorithm","(","data=sample",",","count_clusters=2",",","chromosome_count=20",",","population_count=20",",","count_mutation_gens=1",",","observer=observer_instance",")","#","Start","processing","ga_instance.process","(",")","#","Obtain","results","clusters","=","ga_instance.get_clusters","(",")","#","Print","cluster","to","console","print","(","``","Amount","of","clusters",":","'","%","d","'",".","Clusters",":","'","%","s","'","''","%","(","len","(","clusters",")",",","clusters",")",")","#","Show","cluster","using","observer",":","ga_visualizer.show_clusters","(","sample",",","observer_instance",")","@","endcode","@","see","cluster_visualizer"]
docstr: !
  @brief Closes figure object that was used or allocated by the visualizer.
  
  @param[in] figure (figure): Figure object that was used or allocated by the visualizer.
docstr_tok: ["!","@","brief","Closes","figure","object","that","was","used","or","allocated","by","the","visualizer",".","@","param","[","in","]","figure","(","figure",")",":","Figure","object","that","was","used","or","allocated","by","the","visualizer","."]
code: def close(figure):
      """!
      @brief Closes figure object that was used or allocated by the visualizer.
  
      @param[in] figure (figure): Figure object that was used or allocated by the visualizer.
  
      """
      plt.close(figure)
  
imports: import numpy
  import matplotlib.pyplot
  import matplotlib.animation
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.ga_maths import ga_math
label_desc: Use image node_id 4 for calling the ga_visualizer obj's underlying member method code with example usage: obj.close(figure) without return types