Рисование графика plot Gnuplot persist True plot set contour base plot

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#Рисование графика.
plot = Gnuplot(persist = True)
plot('set contour base')
plot('set view 0,0')
plot('set cntrparam levels auto')
plot('set xrange [' + str(xMin[0]) + ':' + str(xMax[0]) + ']')
plot('set yrange [' + str(xMin[1]) + ':' + str(xMax[1]) + ']')
plot('set surface')
x1s = []
x2s = []
fs = []
for item in history:
x1s.append(item['x'][0])
x2s.append(item['x'][1])
fs.append(item['f'])
data = Data(x1s, x2s, fs, with_ = 'linespoints 3 3')
del x1s
del x2s
del fs
plot.splot(str(self.functionLineEdit.text()).replace('x1', 'x').replace('x2', 'y'), data)