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

Attachments
SP1;
PU6202,7431;PD5218,7579;PD4538,6853;PD4375,7834;PD3474,8256;PD4357,8715;PD4480,9702;PD5189,9004;PD6166,9192;PD5721,8302;PD6202,7431;
PU; 
SP2;
PU10533,5908;PD9772,6126;PD9160,5623;PD9133,6414;PD8465,6840;PD9210,7111;PD9408,7877;PD9896,7253;PD10686,7301;PD10243,6644;PD10533,5908;
PU; 
SP3;
PU9223,9998;PD9228,9994;PD9231,9990;PD9232,9985;PD9233,9981;PD9232,9977;PD9230,9973;PD9227,9969;PD9224,9965;PD9220,9961;PD9216,9958;PD9211,9955;PD9206,9953;PD9201,9951;PD9196,9950;PD9191,9949;PD9187,9949;PD9177,9950;PD9167,9953;PD9159,9957;PD9151,9963;PD9144,9969;PD9138,9976;PD9133,9984;PD9129,9993;PD9125,10002;PD9122,10012;PD9121,10021;PD9120,10031;PD9120,10041;PD9121,10051;PD9122,10060;PD9125,10069;PD9139,10098;PD9158,10121;PD9182,10139;PD9210,10151;PD9239,10158;PD9270,10159;PD9301,10155;PD9330,10145;PD9349,10135;PD9367,10123;PD9383,10109;PD9397,10093;PD9410,10077;PD9420,10059;PD9428,10040;PD9435,10020;PD9440,10000;PD9442,9979;PD9443,9958;PD9442,9937;PD9439,9916;PD9435,9895;PD9428,9875;PD9419,9855;PD9405,9831;PD9388,9809;PD9370,9789;PD9349,9772;PD9327,9757;PD9304,9744;PD9280,9734;PD9254,9726;PD9228,9721;PD9201,9718;PD9175,9718;PD9148,9720;PD9121,9724;PD9095,9731;PD9069,9741;PD9045,9753;PD9016,9771;PD8989,9792;PD8966,9815;PD8945,9840;PD8928,9867;PD8913,9896;PD8901,9926;PD8892,9957;PD8886,9989;PD8883,10022;PD8883,10054;PD8886,10087;PD8892,10119;PD8901,10151;PD8913,10182;PD8929,10212;PD8951,10246;PD8976,10276;PD9004,10303;PD9034,10327;PD9066,10348;PD9100,10365;PD9136,10378;PD9173,10388;PD9211,10395;PD9249,10398;PD9287,10397;PD9326,10393;PD9364,10386;PD9401,10375;PD9437,10360;PD9472,10341;PD9511,10315;PD9546,10286;PD9577,10253;PD9604,10218;PD9627,10181;PD9646,10141;PD9661,10100;PD9673,10057;PD9680,10014;PD9683,9970;PD9682,9925;PD9677,9881;PD9668,9838;PD9655,9795;PD9637,9753;PD9615,9713;PD9585,9669;PD9552,9630;PD9514,9596;PD9474,9565;PD9432,9540;PD9387,9518;PD9340,9501;PD9292,9489;PD9242,9481;PD9192,9477;PD9142,9479;PD9092,9485;PD9043,9496;PD8994,9511;PD8947,9532;PD8902,9557;PD8854,9591;PD8811,9628;PD8772,9670;PD8739,9715;PD8710,9763;PD8686,9813;PD8668,9866;PD8654,9920;PD8645,9975;PD8642,10031;PD8644,10087;PD8651,10142;PD8663,10197;PD8681,10251;PD8704,10304;PD8733,10354;PD8770,10407;PD8812,10455;PD8859,10497;PD8909,10534;PD8962,10565;PD9018,10591;PD9076,10612;PD9135,10626;PD9196,10636;PD9258,10639;PD9320,10637;PD9381,10629;PD9442,10615;PD9501,10595;PD9559,10569;PD9615,10537;PD9673,10496;PD9724,10449;PD9770,10398;PD9810,10343;PD9845,10285;PD9873,10224;PD9895,10160;PD9911,10095;PD9921,10028;PD9924,9961;PD9921,9893;PD9912,9826;PD9897,9759;PD9875,9694;PD9846,9631;PD9811,9570;
PU; 
SP4;
PU10319,9330;PD10325,9325;PD10328,9320;PD10330,9315;PD10331,9310;PD10330,9305;PD10328,9300;PD10325,9296;PD10321,9291;PD10317,9287;PD10312,9283;PD10306,9280;PD10300,9277;PD10295,9275;PD10289,9273;PD10284,9272;PD10279,9272;PD10267,9273;PD10256,9276;PD10245,9281;PD10236,9287;PD10228,9294;PD10221,9302;PD10215,9311;PD10210,9321;PD10205,9332;PD10202,9343;PD10200,9354;PD10198,9365;PD10198,9377;PD10199,9388;PD10200,9399;PD10203,9410;PD10218,9443;PD10240,9471;PD10268,9492;PD10300,9507;PD10334,9516;PD10370,9518;PD10405,9514;PD10439,9503;PD10462,9492;PD10483,9478;PD10502,9463;PD10519,9445;PD10534,9426;PD10546,9406;PD10557,9384;PD10565,9361;PD10571,9338;PD10575,9313;PD10576,9289;PD10576,9264;PD10573,9240;PD10568,9216;PD10560,9192;PD10551,9169;PD10535,9141;PD10516,9115;PD10495,9091;PD10472,9070;PD10447,9052;PD10420,9037;PD10392,9025;PD10363,9015;PD10333,9008;PD10302,9004;PD10271,9003;PD10239,9004;PD10208,9009;PD10178,9016;PD10148,9027;PD10118,9040;PD10084,9060;PD10053,9084;PD10025,9110;PD10001,9139;PD9979,9170;PD9961,9203;PD9947,9237;PD9936,9273;PD9928,9310;PD9923,9348;PD9923,9386;PD9925,9424;PD9931,9461;PD9941,9499;PD9954,9535;PD9971,9570;PD9996,9610;PD10025,9646;PD10056,9678;PD10091,9707;PD10128,9732;PD10167,9752;PD10208,9769;PD10250,9782;PD10294,9790;PD10338,9795;PD10383,9796;PD10428,9792;PD10472,9784;PD10516,9772;PD10558,9756;PD10600,9735;PD10645,9706;PD10686,9673;PD10723,9636;PD10756,9596;PD10784,9553;PD10807,9507;PD10826,9460;PD10840,9411;PD10850,9360;PD10855,9309;PD10855,9258;PD10850,9206;PD10841,9155;PD10826,9105;PD10807,9056;PD10782,9009;PD10749,8958;PD10711,8911;PD10669,8870;PD10623,8834;PD10574,8803;PD10522,8776;PD10468,8755;PD10413,8740;PD10356,8729;PD10298,8724;PD10239,8724;PD10181,8730;PD10124,8741;PD10067,8758;PD10012,8780;PD9958,8808;PD9901,8846;PD9850,8889;PD9804,8936;PD9764,8988;PD9729,9043;PD9700,9101;PD9677,9161;PD9660,9223;PD9649,9287;PD9643,9352;PD9644,9417;PD9650,9482;PD9663,9546;PD9682,9609;PD9708,9671;PD9740,9731;PD9782,9793;PD9830,9849;PD9882,9900;PD9940,9944;PD10000,9982;PD10065,10013;PD10131,10039;PD10200,10058;PD10271,10070;PD10342,10076;PD10414,10075;PD10486,10067;PD10557,10052;PD10627,10031;PD10695,10002;PD10760,9967;PD10828,9920;PD10890,9868;PD10944,9810;PD10992,9747;PD11034,9680;PD11068,9610;PD11096,9536;PD11116,9461;PD11129,9384;PD11135,9305;PD11134,9227;PD11125,9148;PD11109,9070;PD11085,8994;PD11053,8920;PD11014,8848;
PU; 
SP5;
PU11442,8634;PD11446,8630;PD11449,8625;PD11450,8620;PD11450,8615;PD11448,8611;PD11446,8607;PD11443,8603;PD11438,8599;PD11434,8596;PD11429,8593;PD11423,8591;PD11418,8589;PD11412,8588;PD11407,8587;PD11402,8587;PD11397,8588;PD11387,8591;PD11377,8595;PD11368,8601;PD11361,8607;PD11355,8615;PD11349,8623;PD11345,8633;PD11342,8642;PD11339,8653;PD11338,8663;PD11337,8674;PD11338,8684;PD11339,8695;PD11341,8705;PD11344,8714;PD11348,8724;PD11367,8752;PD11391,8774;PD11419,8789;PD11450,8798;PD11482,8801;PD11515,8798;PD11546,8789;PD11576,8775;PD11595,8761;PD11612,8746;PD11627,8729;PD11640,8711;PD11650,8691;PD11659,8671;PD11665,8650;PD11669,8628;PD11671,8606;PD11671,8584;PD11669,8561;PD11665,8539;PD11659,8517;PD11651,8496;PD11641,8476;PD11629,8456;PD11611,8432;PD11590,8411;PD11568,8393;PD11544,8378;PD11518,8365;PD11492,8355;PD11465,8348;PD11437,8343;PD11409,8341;PD11380,8342;PD11352,8345;PD11323,8351;PD11296,8360;PD11269,8371;PD11243,8384;PD11219,8401;PD11191,8424;PD11166,8450;PD11145,8477;PD11126,8507;PD11112,8538;PD11100,8570;PD11092,8604;PD11087,8638;PD11085,8673;PD11086,8707;PD11091,8742;PD11098,8776;PD11109,8809;PD11123,8841;PD11141,8872;PD11161,8902;PD11189,8934;PD11220,8963;PD11253,8988;PD11288,9009;PD11326,9026;PD11364,9039;PD11404,9048;PD11444,9054;PD11485,9056;PD11525,9054;PD11566,9048;PD11606,9038;PD11645,9025;PD11683,9007;PD11719,8987;PD11754,8962;PD11791,8929;PD11823,8893;PD11852,8855;PD11875,8814;PD11894,8771;PD11909,8726;PD11920,8680;PD11925,8634;PD11927,8587;PD11924,8540;PD11917,8493;PD11905,8447;PD11890,8402;PD11869,8359;PD11845,8317;PD11816,8278;PD11778,8236;PD11737,8200;PD11693,8169;PD11647,8142;PD11598,8121;PD11547,8104;PD11496,8093;PD11443,8087;PD11390,8085;PD11337,8089;PD11284,8097;PD11232,8111;PD11181,8129;PD11132,8152;PD11085,8180;PD11041,8213;PD10995,8256;PD10954,8302;PD10920,8351;PD10890,8404;PD10867,8458;PD10849,8515;PD10837,8573;PD10830,8632;PD10828,8691;PD10833,8751;PD10842,8809;PD10858,8867;PD10879,8924;PD10905,8978;PD10937,9031;PD10974,9080;PD11021,9130;PD11072,9175;PD11127,9213;PD11185,9245;PD11246,9271;PD11308,9290;PD11373,9304;PD11438,9311;PD11503,9312;PD11569,9307;PD11634,9296;PD11698,9279;PD11760,9255;PD11820,9226;PD11878,9191;PD11932,9149;PD11987,9097;PD12035,9041;PD12077,8980;PD12111,8917;PD12139,8850;PD12160,8782;PD12175,8712;PD12183,8640;PD12184,8568;PD12178,8497;PD12166,8426;PD12146,8356;PD12121,8288;PD12088,8222;PD12049,8159;PD12003,8100;
PU; 
SP6;
PU12565,7565;PD12569,7559;PD12570,7552;PD12568,7547;PD12563,7542;PD12556,7538;PD12549,7535;PD12542,7534;PD12536,7534;PD12522,7539;PD12512,7547;PD12504,7557;PD12499,7570;PD12496,7583;PD12496,7597;PD12498,7611;PD12502,7623;PD12508,7633;PD12514,7642;PD12522,7650;PD12530,7656;PD12539,7662;PD12548,7667;PD12558,7670;PD12568,7673;PD12579,7674;PD12590,7675;PD12600,7675;PD12611,7673;PD12622,7671;PD12632,7668;PD12642,7664;PD12652,7659;PD12676,7640;PD12694,7617;PD12707,7591;PD12714,7563;PD12716,7533;PD12713,7504;PD12704,7476;PD12689,7449;PD12664,7420;PD12634,7397;PD12600,7382;PD12564,7373;PD12526,7372;PD12489,7377;PD12453,7390;PD12420,7409;PD12401,7424;PD12385,7441;PD12370,7459;PD12358,7478;PD12348,7499;PD12340,7520;PD12334,7542;PD12331,7565;PD12329,7587;PD12330,7610;PD12332,7633;PD12337,7655;PD12344,7677;PD12353,7699;PD12364,7719;PD12378,7739;PD12396,7761;PD12416,7780;PD12437,7796;PD12461,7810;PD12485,7822;PD12510,7831;PD12536,7837;PD12563,7841;PD12589,7843;PD12616,7842;PD12643,7838;PD12669,7832;PD12695,7824;PD12720,7813;PD12745,7799;PD12767,7783;PD12792,7762;PD12814,7739;PD12833,7713;PD12849,7687;PD12862,7659;PD12872,7629;PD12879,7599;PD12883,7569;PD12885,7538;PD12883,7507;PD12879,7476;PD12872,7446;PD12862,7416;PD12849,7387;PD12833,7360;PD12814,7333;PD12790,7306;PD12763,7281;PD12734,7260;PD12704,7242;PD12672,7228;PD12639,7217;PD12605,7209;PD12570,7204;PD12535,7203;PD12500,7205;PD12465,7210;PD12431,7218;PD12397,7230;PD12365,7245;PD12334,7263;PD12304,7284;PD12273,7312;PD12246,7342;PD12223,7374;PD12203,7409;PD12187,7444;PD12175,7481;PD12167,7520;PD12162,7558;PD12160,7597;PD12162,7636;PD12168,7675;PD12178,7714;PD12191,7751;PD12208,7787;PD12229,7822;PD12253,7855;PD12283,7888;PD12317,7918;PD12353,7943;PD12391,7965;PD12430,7982;PD12471,7996;PD12513,8005;PD12556,8011;PD12600,8012;PD12643,8009;PD12686,8002;PD12728,7992;PD12769,7977;PD12809,7958;PD12847,7935;PD12883,7908;PD12920,7874;PD12952,7838;PD12980,7798;PD13003,7757;PD13022,7713;PD13037,7668;PD13047,7622;PD13053,7575;PD13054,7528;PD13051,7480;PD13043,7433;PD13031,7387;PD13015,7342;PD12994,7299;PD12969,7257;PD12939,7217;
PU; 
SP7;
PU13581,6469;PD13586,6464;PD13590,6459;PD13592,6453;PD13593,6448;PD13592,6443;PD13589,6438;PD13586,6433;PD13582,6428;PD13577,6424;PD13571,6420;PD13565,6417;PD13559,6414;PD13553,6411;PD13547,6410;PD13541,6409;PD13536,6409;PD13523,6411;PD13511,6414;PD13501,6420;PD13491,6426;PD13483,6434;PD13476,6443;PD13469,6453;PD13464,6464;PD13460,6475;PD13457,6487;PD13455,6499;PD13454,6511;PD13454,6523;PD13455,6535;PD13457,6547;PD13460,6558;PD13478,6593;PD13502,6622;PD13532,6643;PD13566,6658;PD13603,6666;PD13641,6667;PD13678,6662;PD13714,6649;PD13738,6637;PD13760,6621;PD13780,6604;PD13797,6585;PD13812,6564;PD13825,6542;PD13835,6518;PD13843,6494;PD13848,6469;PD13852,6443;PD13853,6417;PD13851,6391;PD13847,6365;PD13841,63

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?

This question has already been answered. Start a new discussion instead.