X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;ds=inline;f=search_list.py;h=d155200d6e3eec57ca5eb94258b586c4e7683009;hb=5d10357688f47bf9ee5f7fdf356e146fc164bdc9;hp=42d176510d4ae558af64c1922e73380f3e39a223;hpb=69b6d701d4298a125c51cd0ac8e884359f93a6ad;p=iramuteq
diff --git a/search_list.py b/search_list.py
index 42d1765..d155200 100644
--- a/search_list.py
+++ b/search_list.py
@@ -18,10 +18,9 @@ import wx
import wx.lib.mixins.listctrl as listmix
import cStringIO
import tempfile
-from functions import exec_rcode, MessageImage
-from dialog import message
+from functions import exec_rcode
+from dialog import message, BarFrame
from chemins import ffr
-from PrintRScript import barplot, dendroandbarplot
#---------------------------------------------------------------------------
class SearchList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin): #wx.Panel, listmix.ColumnSorterMixin):
@@ -265,17 +264,7 @@ class SearchList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSort
colnames = self.first[2:]
rownames = [val[1] for val in datas]
table = [[str(val) for val in line[2:]] for line in datas]
- tmpgraph = tempfile.mktemp(dir=self.parent.parent.TEMPDIR)
- txt = barplot(table, rownames, colnames, self.parent.parent.RscriptsPath['Rgraph'], tmpgraph)
- tmpscript = tempfile.mktemp(dir=self.parent.parent.TEMPDIR)
- with open(tmpscript,'w') as f :
- f.write(txt)
- exec_rcode(self.parent.parent.RPath, tmpscript, wait = True)
- win = MessageImage(self, u"Graphique", size=(700, 500))
- win.addsaveimage(tmpgraph)
- txt = "" % tmpgraph
- win.HtmlPage.SetPage(txt)
- win.Show(True)
+ BarFrame(self.parent.parent, table, colnames, rownames)
def ongraphdendro(self, evt) :
corpus = self.parent.corpus
@@ -289,13 +278,4 @@ class SearchList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSort
rownames = [val[1] for val in datas]
table = [[str(val) for val in line[2:]] for line in datas]
tmpgraph = tempfile.mktemp(dir=self.parent.parent.TEMPDIR)
- txt = dendroandbarplot(table, rownames, colnames, self.parent.parent.RscriptsPath['Rgraph'], tmpgraph, dendro=corpus.dictpathout['Rdendro'])
- tmpscript = tempfile.mktemp(dir=self.parent.parent.TEMPDIR)
- with open(tmpscript,'w') as f :
- f.write(txt)
- exec_rcode(self.parent.parent.RPath, tmpscript, wait = True)
- win = MessageImage(self, u"Graphique", size=(700, 500))
- win.addsaveimage(tmpgraph)
- txt = "" % tmpgraph
- win.HtmlPage.SetPage(txt)
- win.Show(True)
+ BarFrame(self.parent.parent, table, colnames, rownames, tree = corpus.dictpathout['Rdendro'])