I'm a newbie so please be patient... :)

def canvas(self):
	import qt
	self.setCaption('My Canvas')
	c = qtcanvas.QCanvas(self) # <- gives the canvas a parent QObject
	c.resize(315, 207)
	v = qtcanvas.QCanvasView(self)
	v.setGeometry(QRect(200,590,321,211))
	lay = qt.QVBoxLayout(self)
	lay.addWidget(v)
	v.setCanvas(c)
	l = qtcanvas.QCanvasLine(c)
	l.setPen(qt.QPen(qt.Qt.black))
	l.setPoints(10,10,390,390)
	l.show()
	v.show()
	c.update()
	l1 = qtcanvas.QCanvasLine(c)
	l1.setPen(qt.QPen(qt.Qt.red))
	l1.setPoints(20,60,10,230)
	l1.show()
	l2 = qtcanvas.QCanvasLine(c)
	l2.setPen(qt.QPen(qt.Qt.blue))
	l2.setPoints(10,66,99,310)
	l2.show()
	c.update()
	rec = qtcanvas.QCanvasRectangle(c)
	rec.setSize(133,370)
	rec.setPen(qt.QPen(qt.Qt.magenta))
	rec.show()
	c.update()

Some experimental simple code above that works fine in an embedded canvas. What I need to do it take the xy pairs starting with "PD" from a text file (file enclosed) and display them scaled to fit the small canvas. I'm going to use sed to cut into "SP" groups the xy pairs bewteen the colors specified in the text file by "SP1" "SP2" etc. and assign a variable so they can be turned on and off with xxx.show(). I'll be honest I am lost. I've read so much on the web my head is spinning can anyone kind of lay the ground work out for me to get started with?

Thanks very much

There is also an original postscript file before it gets converted to an hpgl plt file that I included previously , would it be easier to use the original .ps file and extract the layers based on colors used in the postscript code? Does Qcanvasview support postscript at all?

I dropped qcanvas for another approach

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.