|
@@ 677-680 (lines=4) @@
|
| 674 |
|
axes = fig.gca(projection='3d');
|
| 675 |
|
else:
|
| 676 |
|
raise NameError('Drawer supports only 2d and 3d data representation');
|
| 677 |
|
|
| 678 |
|
color_index = 0;
|
| 679 |
|
for cluster in clusters:
|
| 680 |
|
color = colors[color_index];
|
| 681 |
|
for item in cluster:
|
| 682 |
|
if (dimension == 1):
|
| 683 |
|
if (data is None):
|
|
@@ 656-659 (lines=4) @@
|
| 653 |
|
elif ( (data is None) and (clusters is not None) ):
|
| 654 |
|
dimension = len(clusters[0][0]);
|
| 655 |
|
else:
|
| 656 |
|
raise NameError('Data or clusters should be specified exactly.');
|
| 657 |
|
|
| 658 |
|
"Draw clusters"
|
| 659 |
|
colors = [ 'red', 'blue', 'darkgreen', 'brown', 'violet',
|
| 660 |
|
'deepskyblue', 'darkgrey', 'lightsalmon', 'deeppink', 'yellow',
|
| 661 |
|
'black', 'mediumspringgreen', 'orange', 'darkviolet', 'darkblue',
|
| 662 |
|
'silver', 'lime', 'pink', 'gold', 'bisque' ];
|