Code Duplication    Length = 5-5 lines in 3 locations

pyclustering/utils/__init__.py 2 locations

@@ 869-873 (lines=5) @@
866
        if (dimension == 1):
867
            if (data is None):
868
                axes.plot(item[0], 0.0, 'w' + marker_descr);
869
            else:
870
                axes.plot(data[item][0], 0.0, 'w' + marker_descr);
871
872
        if (dimension == 2):
873
            if (data is None):
874
                axes.plot(item[0], item[1], 'w' + marker_descr);
875
            else:
876
                axes.plot(data[item][0], data[item][1], 'w' + marker_descr);
@@ 848-852 (lines=5) @@
845
            if (dimension == 1):
846
                if (data is None):
847
                    axes.plot(item[0], 0.0, color = color, marker = marker_descr);
848
                else:
849
                    axes.plot(data[item][0], 0.0, color = color, marker = marker_descr);
850
            
851
            if (dimension == 2):
852
                if (data is None):
853
                    axes.plot(item[0], item[1], color = color, marker = marker_descr);
854
                else:
855
                    axes.plot(data[item][0], data[item][1], color = color, marker = marker_descr);

pyclustering/cluster/__init__.py 1 location

@@ 358-362 (lines=5) @@
355
                else:
356
                    ax.plot(data[item][0], data[item][1], color = color, marker = marker, markersize = markersize);
357
        
358
            elif (dimension == 3):
359
                if (data is None):
360
                    ax.scatter(item[0], item[1], item[2], c = color, marker = marker, s = markersize);
361
                else:
362
                    ax.scatter(data[item][0], data[item][1], data[item][2], c = color, marker = marker, s = markersize);