X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=textwordcloud.py;h=ed4c1cfb4685a8ed8c105347aa8b30e89eca4317;hp=c7ca3f17c16d6ff167922cd128c7857140cb441b;hb=1fbb2fcb56ff6f0e0a0fa67daf55dadced5d0341;hpb=a215187924e98a385f5d481bbb2e9f4b8804aba3 diff --git a/textwordcloud.py b/textwordcloud.py index c7ca3f1..ed4c1cf 100644 --- a/textwordcloud.py +++ b/textwordcloud.py @@ -48,6 +48,10 @@ class WordCloud(AnalyseText): dial.CenterOnParent() res = dial.ShowModal() if res == wx.ID_OK : + if dial.format.GetSelection() == 0 : + svg = 0 + else : + svg = 1 self.parametres['width'] = dial.spin_L.GetValue() self.parametres['height'] = dial.spin_H.GetValue() self.parametres['maxword'] = dial.spin_maxword.GetValue() @@ -56,15 +60,19 @@ class WordCloud(AnalyseText): self.parametres['col_text'] = dial.color_text.GetColour() self.parametres['col_bg'] = dial.color_bg.GetColour() self.parametres['mode'] = dial.typeformeschoice.GetSelection() + self.parametres['svg'] = svg outgraph = os.path.join(os.path.dirname(self.pathout['zipf.png']), 'nuage_') nb = 1 - while os.path.exists(outgraph + str(nb) + '.png') : + if svg : + end = '.svg' + else : + end = '.png' + while os.path.exists(outgraph + str(nb) + end) : nb += 1 - self.parametres['graphout'] = outgraph + str(nb) + '.png' + self.parametres['graphout'] = outgraph + str(nb) + end dial.Destroy() return res - def make_wordcloud(self) : act = ['\t'.join([act, `self.corpus.getlemeff(act)`]) for act in self.actives] with open(self.pathout['actives_eff.csv'], 'w') as f :