From: pierre Date: Mon, 28 Mar 2022 16:29:18 +0000 (+0200) Subject: graphic in spec X-Git-Url: http://iramuteq.org/git?a=commitdiff_plain;h=5d8c0cb1e698b77fff7bc8eceec6ed7de8bcadf4;p=iramuteq graphic in spec --- diff --git a/layout.py b/layout.py index 90c9a61..80ca8b5 100644 --- a/layout.py +++ b/layout.py @@ -767,14 +767,20 @@ class dolexlayout : self.TabStat = aui.AuiNotebook(ira.nb, -1, wx.DefaultPosition) self.TabStat.parametres = parametres self.ListPan = ListForSpec(ira, self, self.DictSpec, self.etoiles) + self.ListPan.pathout = self.pathout if os.path.exists(self.pathout['banalites.csv']) : self.listban = ListForSpec(ira, self, self.dictban, ['eff'] + self.etoiles, usefirst = True) #self.ListPan2 = ListForSpec(sash.rightwin1, self, self.DictSpec, first) self.ListPant = ListForSpec(ira, self, self.DictType, self.etoiles) + self.ListPant.pathout = self.pathout self.ListPanEff = ListForSpec(ira, self, self.DictEff, self.etoiles) + self.ListPanEff.pathout = self.pathout self.ListPanEffType = ListForSpec(ira, self, self.DictEffType, self.etoiles) + self.ListPanEffType.pathout = self.pathout self.ListPanEffRelForme = ListForSpec(ira, self, self.DictEffRelForme, self.etoiles) + self.ListPanEffRelForme.pathout = self.pathout self.ListPanEffRelType = ListForSpec(ira, self, self.DictEffRelType, self.etoiles) + self.ListPanEffRelType.pathout = self.pathout self.TabStat.AddPage(self.ListPan, _(u'Forms').decode('utf8')) if os.path.exists(self.pathout['banalites.csv']) : @@ -823,6 +829,8 @@ class StatLayout: #self.TabStatTot = wx.TextCtrl(self.TabStat, -1, style=wx.NO_BORDER | wx.TE_MULTILINE | wx.TE_RICH2) list_graph = [['zipf.png', 'zipf']] + if os.path.exists(self.pathout['segments_size.png']) : + list_graph.append(['segments_size.png', _(u'Taille des segments')]) self.TabStatTot = GraphPanel(ira.nb, self.pathout, list_graph, self.result['glob']) self.TabStat.AddPage(self.TabStatTot, _(u'Abstract').decode('utf8')) @@ -857,6 +865,7 @@ class GraphPanelDendro(wx.Panel): self.graphnb = 1 self.dictpathout = dico self.dirout = os.path.dirname(self.dictpathout['ira']) + self.pathout = self.dictpathout self.list_graph = list_graph self.parent = self.GetParent()#parent self.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Arial")) diff --git a/textstat.py b/textstat.py index 7d84fa6..7fdf5bd 100755 --- a/textstat.py +++ b/textstat.py @@ -84,7 +84,7 @@ class Stat(AnalyseText) : open_file_graph("%s", width = 400, height = 400) barplot(table(stsize[,1])) dev.off() - """ % (ffr(self.pathout['stsize.csv'])ffr(, self.pathout['segments_size.png'])) + """ % (self.pathout['stsize.csv'], self.pathout['segments_size.png']) tmpscript = tempfile.mktemp(dir=self.parent.TEMPDIR) with open(tmpscript, 'w') as f : f.write(txt)