class_docstr: !
  @brief Visualizer for cluster in multi-dimensional data.
  @details Multi-dimensional cluster visualizer is useful data whose dimension is greater than three, but it
            is able to visualize data with any dimensions. The multidimensional visualizer helps to overcome
            'cluster_visualizer' shortcoming - an ability to display clusters in 1D, 2D or 3D dimensional data
            space only.
  
      Example of clustering results visualization where `Iris` is used:
      @code
          from pyclustering.utils import read_sample
          from pyclustering.samples.definitions import FAMOUS_SAMPLES
          from pyclustering.cluster import cluster_visualizer_multidim
          from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
          from pyclustering.cluster.xmeans import xmeans
  
          # load 4D data sample 'Iris'
          sample_4d = read_sample(FAMOUS_SAMPLES.SAMPLE_IRIS)
  
          # initialize 3 initial centers using K-Means++ algorithm
          centers = kmeans_plusplus_initializer(sample_4d, 3).initialize()
  
          # performs cluster analysis using X-Means
          xmeans_instance = xmeans(sample_4d, centers)
          xmeans_instance.process()
          clusters = xmeans_instance.get_clusters()
  
          # visualize obtained clusters in multi-dimensional space
          visualizer = cluster_visualizer_multidim()
          visualizer.append_clusters(clusters, sample_4d)
          visualizer.show(max_row_size=3)
      @endcode
  
      Visualized clustering results of `Iris` data (multi-dimensional data):
      @image html xmeans_clustering_famous_iris.png "Fig. 1. X-Means clustering results (data 'Iris')."
  
      Sometimes no need to display results in all dimensions. Parameter `filter` can be used to display only
      interesting coordinate pairs. Here is an example of visualization of pair coordinates (x0, x1) and (x0, x2) for
      previous clustering results:
      @code
          visualizer = cluster_visualizer_multidim()
          visualizer.append_clusters(clusters, sample_4d)
          visualizer.show(pair_filter=[[0, 1], [0, 2]])
      @endcode
  
      Visualized results of specified coordinate pairs:
      @image html xmeans_clustering_famous_iris_filtered.png "Fig. 2. X-Means clustering results (x0, x1) and (x0, x2) (data 'Iris')."
  
      The multi-dimensional visualizer can be used to display clusters in 1-, 2- and 3-dimensional data similar to
      `cluster_visualizer`. `cluster_visualizer_multidim` uses three plots to display 3-dimensional data:
      `(x0, x1)`, `(x0, x2)` and `(x1, x2)`. There is an example:
      @code
          from pyclustering.utils import read_sample
          from pyclustering.samples.definitions import FCPS_SAMPLES
          from pyclustering.cluster import cluster_visualizer_multidim
          from pyclustering.cluster.gmeans import gmeans
  
          # load 3-dimensional data sample 'Hepta'
          sample_3d = read_sample(FCPS_SAMPLES.SAMPLE_HEPTA)
  
          # performs cluster analysis using G-Means algorithm
          gmeans_instance = gmeans(sample_3d).process().get_clusters()
  
          # visualize obtained clusters in 3-dimensional space (x0, x1), (x0, x2), (x1, x2):
          visualizer = cluster_visualizer_multidim()
          visualizer.append_clusters(clusters, sample_3d)
          visualizer.show(max_row_size=3)
      @endcode
  
      Visualized clustering results of `Hepta` data (3-dimensional data):
      @image html gmeans_hepta_multidim_visualizer.png "Fig. 3. G-Means clustering results (3-dimensional data 'Hepta')."
  
      Example with 2-dimensional data `Lsun`:
      @code
          # load 2-dimensional data sample 'Lsun'
          sample_2d = read_sample(FCPS_SAMPLES.SAMPLE_LSUN)
          clusters = gmeans(sample_2d).process().get_clusters()
  
          # visualize obtained clusters in 2-dimensional space (x0, x1):
          visualizer = cluster_visualizer_multidim()
          visualizer.append_clusters(clusters, sample_2d)
          visualizer.show()
      @endcode
  
      Visualized clustering results of `Lsun` (2-dimensional data):
      @image html gmeans_lsun_multidim_visualizer.png "Fig. 4. G-Means clustering results (2-dimensional data 'Lsun')."
docstr: !
  @brief Create new canvas with user defined parameters to display cluster or chunk of cluster on it.
  
  @param[in] dimension (uint): Data-space dimension.
  @param[in] pairs (list): Pair of coordinates that will be displayed on the canvas. If empty than label will not
              be displayed on the canvas.
  @param[in] position (uint): Index position of canvas on a grid.
  @param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'visible_axis' 'visible_labels', 'visible_grid').
  
  <b>Keyword Args:</b><br>
      - visible_axis (bool): Defines visibility of axes on each canvas, if True - axes are visible.
         By default axis are not displayed.
      - visible_labels (bool): Defines visibility of labels on each canvas, if True - labels is displayed.
         By default labels are displayed.
      - visible_grid (bool): Defines visibility of grid on each canvas, if True - grid is displayed.
         By default grid is displayed.
  
  @return (matplotlib.Axis) Canvas to display cluster of chuck of cluster.
docstr_tok: ["!","@","brief","Create","new","canvas","with","user","defined","parameters","to","display","cluster","or","chunk","of","cluster","on","it",".","@","param","[","in","]","dimension","(","uint",")",":","Data-space","dimension",".","@","param","[","in","]","pairs","(","list",")",":","Pair","of","coordinates","that","will","be","displayed","on","the","canvas",".","If","empty","than","label","will","not","be","displayed","on","the","canvas",".","@","param","[","in","]","position","(","uint",")",":","Index","position","of","canvas","on","a","grid",".","@","param","[","in","]","*","*","kwargs",":","Arbitrary","keyword","arguments","(","available","arguments",":","'visible_axis","'","'visible_labels","'",",","'visible_grid","'",")",".","<","b",">","Keyword","Args",":","<","\/b",">","<","br",">","-","visible_axis","(","bool",")",":","Defines","visibility","of","axes","on","each","canvas",",","if","True","-","axes","are","visible",".","By","default","axis","are","not","displayed",".","-","visible_labels","(","bool",")",":","Defines","visibility","of","labels","on","each","canvas",",","if","True","-","labels","is","displayed",".","By","default","labels","are","displayed",".","-","visible_grid","(","bool",")",":","Defines","visibility","of","grid","on","each","canvas",",","if","True","-","grid","is","displayed",".","By","default","grid","is","displayed",".","@","return","(","matplotlib.Axis",")","Canvas","to","display","cluster","of","chuck","of","cluster","."]
code: def __create_canvas(self, dimension, pairs, position, **kwargs):
      """!
      @brief Create new canvas with user defined parameters to display cluster or chunk of cluster on it.
  
      @param[in] dimension (uint): Data-space dimension.
      @param[in] pairs (list): Pair of coordinates that will be displayed on the canvas. If empty than label will not
                  be displayed on the canvas.
      @param[in] position (uint): Index position of canvas on a grid.
      @param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'visible_axis' 'visible_labels', 'visible_grid').
  
      <b>Keyword Args:</b><br>
          - visible_axis (bool): Defines visibility of axes on each canvas, if True - axes are visible.
             By default axis are not displayed.
          - visible_labels (bool): Defines visibility of labels on each canvas, if True - labels is displayed.
             By default labels are displayed.
          - visible_grid (bool): Defines visibility of grid on each canvas, if True - grid is displayed.
             By default grid is displayed.
  
      @return (matplotlib.Axis) Canvas to display cluster of chuck of cluster.
  
      """
      visible_grid = kwargs.get("visible_grid", True)
      visible_labels = kwargs.get("visible_labels", True)
      visible_axis = kwargs.get("visible_axis", False)
  
      ax = self.__figure.add_subplot(self.__grid_spec[position])
  
      if dimension > 1:
          if visible_labels:
              ax.set_xlabel("x%d" % pairs[position][0])
              ax.set_ylabel("x%d" % pairs[position][1])
      else:
          ax.set_ylim(-0.5, 0.5)
          ax.set_yticklabels([])
  
      if visible_grid:
          ax.grid(True)
  
      if not visible_axis:
          ax.set_yticklabels([])
          ax.set_xticklabels([])
  
      return ax
  
imports: import itertools
  import math
  import matplotlib.pyplot
  import matplotlib.gridspec
  from mpl_toolkits.mplot3d import Axes3D
  from pyclustering.utils.color import color
label_desc: Use image node_id 9 for calling the cluster_visualizer_multidim obj's underlying member method code with example usage: obj.__create_canvas(dimension, pairs, position) and returns: ax