X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=layout.py;h=aed4de2ddf7acd8f6468c644b1a5958e3f3b325a;hp=df30cfdabcb428eba68dc093d5fa1124c9686cbc;hb=9bde3d55d2131f1a33234a43c0de8b200ddb8f9a;hpb=5d8a0a0e99d9075adc28f2525fe0aba8e14c2b0a diff --git a/layout.py b/layout.py index df30cfd..aed4de2 100644 --- a/layout.py +++ b/layout.py @@ -10,8 +10,8 @@ import wx import agw.aui as aui from chemins import ConstructPathOut, ChdTxtPathOut, FFF, ffr, PathOut, StatTxtPathOut, simipath from ConfigParser import ConfigParser -from functions import ReadProfileAsDico, GetTxtProfile, read_list_file, ReadList, exec_rcode, print_liste, BugReport, DoConf, indices_simi, check_Rresult -from ProfList import * +from functions import ReadProfileAsDico, GetTxtProfile, read_list_file, ReadList, exec_rcode, print_liste, BugReport, DoConf, indices_simi, check_Rresult, progressbar +from ProfList import ProfListctrlPanel from guiparam3d import param3d, simi3d from PrintRScript import write_afc_graph, print_simi3d, PrintSimiScript from profile_segment import ProfileSegment @@ -89,6 +89,7 @@ class GraphPanelAfc(wx.Panel): 'facteur' : [1,2,3], 'alpha' : 10, 'clnb' : clnb, + 'svg' : 0, } self.__set_properties() @@ -155,6 +156,10 @@ class GraphPanelAfc(wx.Panel): dial.CenterOnParent() val = dial.ShowModal() if val == wx.ID_OK : + if dial.choix_format.GetSelection() == 0 : + svg = 0 + else : + svg = 1 self.param = {'typegraph' : dial.choicetype.GetSelection(), 'width' : dial.spin1.GetValue(), 'height' : dial.spin2.GetValue(), @@ -177,7 +182,8 @@ class GraphPanelAfc(wx.Panel): 'facteur' : [dial.spin_f1.GetValue(),dial.spin_f2.GetValue(), dial.spin_f3.GetValue()], 'clnb' : self.clnb, 'film' : str(dial.film.GetValue()).upper(), - 'alpha' : dial.slider_sphere.GetValue() + 'alpha' : dial.slider_sphere.GetValue(), + 'svg' : svg } self.nb.parent = self.ira self.DictPathOut = self.Dict @@ -190,12 +196,6 @@ 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 +=""" @@ -587,9 +587,8 @@ def PrintRapport(self, corpus, parametres, txt = True): temps d'analyse : %s ########################### """ % parametres['time'] - file = open(self.pathout['pre_rapport'], 'w') - file.write(txt) - file.close() + with open(self.pathout['pre_rapport'], 'w') as f : + f.write(txt) class dolexlayout : def __init__(self, ira, corpus, parametres):