Changeset 9625:b851627239ef in orange


Ignore:
Timestamp:
02/02/12 11:05:11 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
rebase_source:
fe53bd626adf0baa28f32a843d1f1d7e89276a6d
Message:

Fixed a bug in FragViz on one component only. Crazy, I know.

Location:
orange/OrangeWidgets/Unsupervised
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Unsupervised/OWNxCanvasQt.py

    r9588 r9625  
    154154            distances = distances.avgLinkage(components) 
    155155 
     156        # if only one component 
     157        if distances.dim == 1: 
     158            return 0 
     159 
    156160        mds = Orange.projection.mds.MDS(distances) 
    157161        mds.optimize(10, Orange.projection.mds.SgnRelStress, 0) 
     
    169173        animate_points = p.animate_points 
    170174        p.animate_points = False 
     175 
     176        # if only one component 
     177        if d_mds == 0 or d_fr == 0: 
     178            d_mds = 1 
     179            d_fr = 1 
    171180 
    172181        self.set_node_coordinates(dict( 
     
    408417            neighbours |= newNeighbours 
    409418        return neighbours 
    410              
     419 
    411420    def mark_on_selection_changed(self): 
    412421        toMark = set() 
     
    521530        if self.show_indices: 
    522531            indices = [[str(u)] for u in nodes] 
    523          
     532 
    524533        distances = [[] for u in nodes] 
    525534        show_distances = False 
     
    528537            distances = self.label_distances 
    529538            show_distances = True 
    530              
     539 
    531540        if len(label_attributes) == 0 and \ 
    532541                        not self.show_indices and not show_distances: 
     
    539548                for att in label_attributes])) for i, node in enumerate(nodes))) 
    540549        else: 
    541             self.networkCurve.set_node_labels(dict((node, ', '.join( \ 
     550            self.networkCurve.set_node_labels(dict((node, ', '.join(\ 
    542551                        distances[i] + indices[i] + \ 
    543552                           [str(self.items[node][att]) for att in \ 
  • orange/OrangeWidgets/Unsupervised/OWNxExplorer.py

    r9624 r9625  
    1414import OWGUI 
    1515import OWColorPalette 
    16 #import OWToolbars 
    1716import orngMDS 
    1817 
  • orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py

    r9624 r9625  
    11import OWToolbars 
    22import OWColorPalette 
     3import orngMDS 
    34 
    45from OWWidget import * 
Note: See TracChangeset for help on using the changeset viewer.