22
33x = vcs .init (bg = 1 , geometry = (800 , 600 ))
44txt = x .createtext ()
5- txt .x = [.0000005 , .00000005 , .5 ,.99999 , .999999 ]
6- txt .y = [0.05 , .9 , .5 ,.9 , 0.05 ]
5+ txt .x = [0.2 , 0.2 , 0 .5 , 0.8 , 0.8 ]
6+ txt .y = [0.2 , 0.8 , 0 .5 , 0.8 , 0.2 ]
77txt .string = ["SAMPLE TEXT A" ,"SAMPLE TEXT B" ,"SAMPLE TEXT C" ,"SAMPLE TEXT D" ,"SAMPLE TEXT E" ]
88txt .halign = "center"
99txt .valign = "base"
1010txt .height = 10
1111x .plot (txt )
1212
1313tmpfile = tempfile .NamedTemporaryFile (suffix = '.ps' , \
14- prefix = 'textAsPathsFalse' , delete = True )
14+ prefix = 'textAsPathsFalse' , delete = False )
1515x .postscript (tmpfile .name , textAsPaths = False )
1616tmpfile .close ()
1717
1818tmpfile = tempfile .NamedTemporaryFile (suffix = '.ps' , \
19- prefix = 'textAsPathsTrue' , delete = True )
19+ prefix = 'textAsPathsTrue' , delete = False )
2020x .postscript (tmpfile .name , textAsPaths = True )
2121tmpfile .close ()
2222
2323tmpfile = tempfile .NamedTemporaryFile (suffix = '.pdf' , \
24- prefix = 'textAsPathsFalse' , delete = True )
24+ prefix = 'textAsPathsFalse' , delete = False )
2525x .pdf (tmpfile .name , textAsPaths = False )
26- # tmpfile.close()
26+ tmpfile .close ()
2727
2828tmpfile = tempfile .NamedTemporaryFile (suffix = '.pdf' , \
29- prefix = 'textAsPathsTrue' , delete = True )
29+ prefix = 'textAsPathsTrue' , delete = False )
3030x .pdf (tmpfile .name , textAsPaths = True )
3131tmpfile .close ()
3232
3333tmpfile = tempfile .NamedTemporaryFile (suffix = '.svg' , \
34- prefix = 'textAsPathsFalse' , delete = True )
34+ prefix = 'textAsPathsFalse' , delete = False )
3535x .svg (tmpfile .name , textAsPaths = False )
3636tmpfile .close ()
3737
3838tmpfile = tempfile .NamedTemporaryFile (suffix = '.svg' , \
39- prefix = 'textAsPathsTrue' , delete = True )
39+ prefix = 'textAsPathsTrue' , delete = False )
4040x .svg (tmpfile .name , textAsPaths = True )
4141tmpfile .close ()
4242
4343tmpfile = tempfile .NamedTemporaryFile (suffix = '.eps' , \
44- prefix = 'textAsPathsFalse' , delete = True )
44+ prefix = 'textAsPathsFalse' , delete = False )
4545x .eps (tmpfile .name , textAsPaths = False )
4646tmpfile .close ()
4747
4848tmpfile = tempfile .NamedTemporaryFile (suffix = '.eps' , \
49- prefix = 'textAsPathsTrue' , delete = True )
49+ prefix = 'textAsPathsTrue' , delete = False )
5050x .eps (tmpfile .name , textAsPaths = True )
5151tmpfile .close ()
0 commit comments