On Wednesday 30 March 2005 10:39 pm, John Hunter wrote: > JDH> - implement draw_markers and draw_lines with the new API > JDH> (transform is done in backend). [..snip..] I made a first (and second) attempt at implementing draw_markers and draw_lines in the postscript backend. The changes are in CVS, although I left draw_markers masked as _draw_markers, it needs to be unmasked if you want to try it out. I found some places for speed/memory/ps-filesize improvements. With draw_markers masked, the script below took 2.43 seconds to generate and write the 1.5MB eps file. With draw_markers unmasked, it took 0.69 seconds to make a 350KB eps file. Some comments: 1) Circles are being drawn with draw_markers, but agg.path_storage has no curve information in it? Circles are faithfully reproduced in ps output, but it takes 50 line segments to draw each circle in plot(arange(10000),'-o'). 2) I think each tickmark is listed in agg.path_storage twice, and therefore gets rendered twice in PS. 3) I expected marker paths to be terminated with the agg.path_cmd_end_poly code. This is not the case. What is the purpose of path_cmd_end_poly? 4) I am getting an unrecognized agg.path_commands_e code. They should be one of 0,1,2,3,4,6,0x0F, and I am getting a value of 70. ?? I just ignore it and PS seems to render fine. 5) Im not doing anything with vec6 = transform.as_vec6_val(). I'm not sure what it is used for. 6) draw_lines is getting a long pathlist from agg. Rather than draw a straight line between two points, it is doing something like 50.106 249.850 moveto 53.826 249.850 lineto 57.546 249.850 lineto 61.266 249.850 lineto and thats just for the line in the legend! The straight line in the actual plot has many, many intermediate points. Feedback appreciated! from pylab import * from time import clock figure(1) plot(arange(10000),'-s') l=legend(('1e4 markers',)) d = clock() savefig('temp.eps') print clock()-d -- Darren