1- Extension { #name : ' PMPrincipalComponentAnalyserSVD' }
1+ Extension { #name : # PMPrincipalComponentAnalyserSVD }
22
3- { #category : ' *Math-Visualizations' }
3+ { #category : # ' *Math-Visualizations' }
44PMPrincipalComponentAnalyserSVD class >> example1 [
55 " Extract 4 columns from original data"
66
@@ -28,7 +28,7 @@ PMPrincipalComponentAnalyserSVD class >> example1 [
2828 addColumn: (irisDataFrame columnsFrom: 5 to: 5 ) asArrayOfColumns first
2929 named: ' type' .
3030
31- roassalChart := RSCompositeChart new
31+ roassalChart := self roassalChartClass new
3232 title: ' PCA of Iris Data Frame' ;
3333 addDecoration: (RSHorizontalTick new doNotUseNiceLabel asFloat: 3 );
3434 addDecoration: RSVerticalTick new ;
@@ -49,7 +49,7 @@ PMPrincipalComponentAnalyserSVD class >> example1 [
4949
5050]
5151
52- { #category : ' *Math-Visualizations' }
52+ { #category : # ' *Math-Visualizations' }
5353PMPrincipalComponentAnalyserSVD class >> example2 [
5454 " Extract 4 columns from original data. This example uses Random colors for each flower type"
5555
@@ -81,3 +81,12 @@ PMPrincipalComponentAnalyserSVD class >> example2 [
8181 openScatterPlotWithTitle: ' PCA of Iris data set'
8282 forColumn: ' type' .
8383]
84+
85+ { #category : #' *Math-Visualizations' }
86+ PMPrincipalComponentAnalyserSVD class >> roassalChartClass [
87+
88+ ^ SystemVersion current major < 12
89+ ifTrue: [ Smalltalk at: #RSChart ]
90+ ifFalse: [ Smalltalk at: #RSCompositeChart ]
91+
92+ ]
0 commit comments