from Controller import * import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils, Numeric def drawScatterplot(A2, B2, name1, name2, mode): if (mode == "Pairwise"): C = [A2, B2] C = pairwiseDelete(C) A = C[0] B = C[1] elif (mode == "Zero"): A = zeroSubst(A2) B = zeroSubst(B2) else: A = meanSubst(A2) B = meanSubst(B2) g = Gnuplot.Gnuplot(debug=1) g.title(name1 + " vs " + name2) c = Gnuplot.PlotItems.Data(A, B) g('set xlabel "' + name1 + '"') g('set ylabel "' + name2 + '"') g.plot(c) #drawScatterplot([4, 2, 6, 4, 4, 3], [6, 2, 5, 1, 2, 1], "test")