bug in saving figure with dashed lines

Eric Emsellem <emsellem@...419...> writes:

But when saving it in a postscript the dashed line looks solid on most
of the plot.
This happens if there are too many points in the line:

The draw_lines method in the PS backend divides the line into
subsequences of at most 50 points, and calls the "stroke" operator for
each subsequence, which in effect resets the dash offset. Thus if 50
consecutive points fit within a dash, the line appears solid.

I suppose the division into subsequences solves some memory or speed
problem with PS interpreters, so it should be retained. Then the
solution would be to compute the length X of each subsequence and do
something like "currentdash pop X setdash" after the "stroke".