def append_cluster(self, cluster, data=None, canvas=<NUM_LIT:0>, marker='<STR_LIT:.>', markersize=None, color=None):
if len(cluster) == <NUM_LIT:0>:<EOL><INDENT>return<EOL><DEDENT>if canvas > self.__number_canvases or canvas < <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>" % self.__number_canvases or canvas)<EOL><DEDENT>if color is None:<EOL><INDENT>index_color = len(self.__canvas_clusters[canvas]) % len(color_list.TITLES)<EOL>color = color_list.TITLES[index_color]<EOL><DEDENT>added_canvas_descriptor = canvas_cluster_descr(cluster, data, marker, markersize, color)<EOL>self.__canvas_clusters[canvas].append( added_canvas_descriptor )<EOL>if data is None:<EOL><INDENT>dimension = len(cluster[<NUM_LIT:0>])<EOL>if self.__canvas_dimensions[canvas] is None:<EOL><INDENT>self.__canvas_dimensions[canvas] = dimension<EOL><DEDENT>elif self.__canvas_dimensions[canvas] != dimension:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>dimension = len(data[<NUM_LIT:0>])<EOL>if self.__canvas_dimensions[canvas] is None:<EOL><INDENT>self.__canvas_dimensions[canvas] = dimension<EOL><DEDENT>elif self.__canvas_dimensions[canvas] != dimension:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>if (dimension < <NUM_LIT:1>) or (dimension > <NUM_LIT:3>):<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>if markersize is None:<EOL><INDENT>if (dimension == <NUM_LIT:1>) or (dimension == <NUM_LIT:2>):<EOL><INDENT>added_canvas_descriptor.markersize = self.__default_2d_marker_size<EOL><DEDENT>elif dimension == <NUM_LIT:3>:<EOL><INDENT>added_canvas_descriptor.markersize = self.__default_3d_marker_size<EOL><DEDENT><DEDENT>return len(self.__canvas_clusters[canvas]) - <NUM_LIT:1><EOL>
!
        @brief Appends cluster to canvas for drawing.

        @param[in] cluster (list): cluster that may consist of indexes of objects from the data or object itself.
        @param[in] data (list): If defines that each element of cluster is considered as a index of object from the data.
        @param[in] canvas (uint): Number of canvas that should be used for displaying cluster.
        @param[in] marker (string): Marker that is used for displaying objects from cluster on the canvas.
        @param[in] markersize (uint): Size of marker.
        @param[in] color (string): Color of marker.

        @return Returns index of cluster descriptor on the canvas.