X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textwordcloud.py;fp=textwordcloud.py;h=bc875bc0449d88888dfcbc29d5ba7eada2226710;hp=908ba89c60ab565b43d9069afaf82eaf4d4d1eaa;hb=2ffa9388c45dce689bb45c1cf6c7ad81d2636409;hpb=b1e7a76f583a5715d025a9b896508969efa06c24 diff --git a/textwordcloud.py b/textwordcloud.py index 908ba89..bc875bc 100644 --- a/textwordcloud.py +++ b/textwordcloud.py @@ -43,8 +43,8 @@ class WordCloud(AnalyseText): else : return 'NOK' - def make_option(self) : - dial = PrefWordCloud(self.ira) + def make_option(self, fromcluster = False) : + dial = PrefWordCloud(self.ira, fromcluster) dial.CenterOnParent() res = dial.ShowModal() if res == wx.ID_OK : @@ -61,6 +61,8 @@ class WordCloud(AnalyseText): self.parametres['col_bg'] = dial.color_bg.GetColour() self.parametres['mode'] = dial.typeformeschoice.GetSelection() self.parametres['svg'] = svg + if fromcluster : + self.parametres['indice'] = dial.indice.GetSelection() outgraph = os.path.join(os.path.dirname(self.pathout['zipf.png']), 'nuage_') nb = 1 if svg : @@ -84,11 +86,11 @@ class ClusterCloud(WordCloud) : self.parametres['type'] = 'clustercloud' #FIXME limit = 2 - res = self.make_option() + res = self.make_option(True) if res == wx.ID_OK : prof = self.parametres['clusterprof'] del self.parametres['clusterprof'] - if self.parametres.get('unit', 0) == 0 : + if self.parametres['indice'] == 0 : tokeep = 1 else : tokeep = 2