X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=layout.py;h=bee04eeed304653eb87f9c1f731db4dd84f3f751;hp=642121cfb4daba9c66b40af293a921424e70a80f;hb=1f82fb8e9ed83b8524b00039f1a8c51c2b12a8be;hpb=a503f041dc4947ee21c1d353ddd05ddb13a5e322 diff --git a/layout.py b/layout.py index 642121c..bee04ee 100644 --- a/layout.py +++ b/layout.py @@ -65,8 +65,10 @@ class GraphPanelAfc(wx.Panel): 'qui' : 0, 'do_select_nb' : 0, 'do_select_chi' : 0, + 'do_select_chi_classe' : 0, 'select_nb' : 50, 'select_chi' : 4, + 'nbchic' : 30, 'over' : 0, 'cex_txt' : 0, 'txt_min' : 5, @@ -116,8 +118,10 @@ class GraphPanelAfc(wx.Panel): 'qui' : dial.choice2.GetSelection(), 'do_select_nb' : dial.check1.GetValue(), 'do_select_chi' : dial.check2.GetValue(), + 'do_select_chi_classe' : dial.check_chic.GetValue(), 'select_nb' : dial.spin_nb.GetValue(), 'select_chi' : dial.spin_chi.GetValue(), + 'nbchic' : dial.spin_nbchic.GetValue(), 'over' : dial.check3.GetValue(), 'cex_txt' : dial.check4.GetValue(), 'txt_min' : dial.spin_min.GetValue(), @@ -142,6 +146,12 @@ class GraphPanelAfc(wx.Panel): afc <- afcf afc_table <- afcf_table chistabletot <- specfp + infp <- which(is.infinite(chistabletot) & chistabletot > 0) + infm <- which(is.infinite(chistabletot) & chistabletot < 0) + chistabletot[infp] <- 0 + chistabletot[infm] <- 0 + chistabletot[infp] <- max(chistabletot) + 1 + chistabletot[infm] <- min(chistabletot) - 1 """ elif self.itempath == 'liste_graph_afct' : txt +=""" @@ -952,29 +962,32 @@ class SimiLayout(DefaultTextLayout) : if self.actives is None : with codecs.open(self.pathout['actives.csv'], 'r', self.parametres['encoding']) as f : self.actives = f.read() - self.actives = [act for act in self.actives.splitlines()] + self.actives = self.actives.splitlines()#[act for act in self.actives.splitlines()] dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) - SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], selected = selected) - prep = PrepSimi(self.ira, self.parametres, indices_simi) - self.parametres = prep.parametres - script = PrintSimiScript(self) - script.make_script() - pid = exec_rcode(self.ira.RPath, script.scriptout, wait = True) - check_Rresult(self.ira, pid) - if self.parametres['type_graph'] == 1: - if os.path.exists(self.pathout['liste_graph']): - graph_simi = read_list_file(self.pathout['liste_graph']) - graph_simi.append([os.path.basename(script.filename), script.txtgraph]) - else : - graph_simi = [[os.path.basename(script.filename), script.txtgraph]] - print_liste(self.pathout['liste_graph'], graph_simi) - DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) - if self.parametres['type_graph'] == 1: - self.graphpan.sizer_3.Add(wx.StaticBitmap(self.graphpan.panel_1, -1, wx.Bitmap(script.filename, wx.BITMAP_TYPE_ANY)), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) - self.graphpan.sizer_3.Add(wx.StaticText(self.graphpan.panel_1,-1, script.txtgraph), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) - self.graphpan.sizer_3.Fit(self.graphpan.panel_1) - self.graphpan.Layout() - self.graphpan.panel_1.Scroll(0,self.graphpan.panel_1.GetScrollRange(wx.VERTICAL)) + #res = SelectColumn(self.ira, dictcol, self.actives, self.pathout['selected.csv'], selected = selected, dlg = True) + #if res.ok : + prep = PrepSimi(self.ira, self, self.parametres,self.pathout['selected.csv'], self.actives, indices_simi, wordlist = dictcol, selected = selected) + if prep.val == wx.ID_OK : + self.parametres = prep.parametres + + script = PrintSimiScript(self) + script.make_script() + pid = exec_rcode(self.ira.RPath, script.scriptout, wait = True) + check_Rresult(self.ira, pid) + if self.parametres['type_graph'] == 1: + if os.path.exists(self.pathout['liste_graph']): + graph_simi = read_list_file(self.pathout['liste_graph']) + graph_simi.append([os.path.basename(script.filename), script.txtgraph]) + else : + graph_simi = [[os.path.basename(script.filename), script.txtgraph]] + print_liste(self.pathout['liste_graph'], graph_simi) + DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) + if self.parametres['type_graph'] == 1: + self.graphpan.sizer_3.Add(wx.StaticBitmap(self.graphpan.panel_1, -1, wx.Bitmap(script.filename, wx.BITMAP_TYPE_ANY)), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) + self.graphpan.sizer_3.Add(wx.StaticText(self.graphpan.panel_1,-1, script.txtgraph), 0, wx.ALIGN_CENTER_HORIZONTAL, 0) + self.graphpan.sizer_3.Fit(self.graphpan.panel_1) + self.graphpan.Layout() + self.graphpan.panel_1.Scroll(0,self.graphpan.panel_1.GetScrollRange(wx.VERTICAL)) def export(self, evt) : pass