def plot_lines_plot(self, lines, sb_nr = 111, text = "", wtp = [True, True, True]):
self.plot1 = self.figure.add_subplot(sb_nr)
self.plot1.set_title("Lines Plot %s" % sb_nr)
self.plot1.grid(b = True, which = 'both', color = '0.65', linestyle = '-')
self.plot1.hold(True)
self.plot1.text(0.5, 0, text, ha = 'left', fontsize = 8)
for line_nr in range(len(lines)):
line = lines[line_nr]
if wtp[0]:
line.plot2plot(self.plot1)
if wtp[1]:
line.Ps.plot2plot(self.plot1, format = 'xr')
line.Pe.plot2plot(self.plot1, format = 'og')
Ps = (line.Ps + line.Pe) * 0.5
if wtp[2]:
self.plot1.text(Ps.x, Ps.y, line_nr, ha = 'left', fontsize = 10, color = 'red')
self.plot1.axis('scaled')
self.plot1.margins(y = .1, x = .1)
self.plot1.autoscale(True, 'both', False)
self.canvas.show()
评论列表
文章目录