Changeset 10566:e807f3d1711a in orange


Ignore:
Timestamp:
03/18/12 22:26:07 (2 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Message:

Modified scree plot so that it can plot for thousands of components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/projection/linear.py

    r10564 r10566  
    15361536    ################ Plotting functions ################### 
    15371537 
    1538     def scree_plot(self, filename = None, title = 'Scree plot'): 
     1538    def scree_plot(self, filename = None, title = 'Scree Plot'): 
    15391539        """ 
    15401540        Draw a scree plot of principal components 
     
    15561556 
    15571557        x_axis = range(len(self.eigen_values)) 
    1558         x_labels = ["PC%d" % (i + 1, ) for i in x_axis] 
    1559  
    1560         ax.set_xticks(x_axis) 
    1561         ax.set_xticklabels(x_labels) 
    1562         plt.setp(ax.get_xticklabels(), "rotation", 90) 
     1558#        x_labels = ["PC%d" % (i + 1, ) for i in x_axis] 
     1559 
     1560#        ax.set_xticks(x_axis) 
     1561#        ax.set_xticklabels(x_labels) 
     1562#        plt.setp(ax.get_xticklabels(), "rotation", 90) 
    15631563        plt.grid(True) 
    15641564 
    1565         ax.set_xlabel('Principal components') 
     1565        ax.set_xlabel('Principal Component Number') 
    15661566        ax.set_ylabel('Proportion of Variance') 
    15671567        ax.set_title(title + "\n") 
Note: See TracChangeset for help on using the changeset viewer.