|
From: John H. <jdh...@ac...> - 2006-04-04 21:06:02
|
>>>>> "Steve" == Steve Schmerler <el...@gm...> writes:
Steve> Hi In the plot produced by this here the straight line
Steve> isn't really straight and seems to "try to interpolate" the
Steve> data points.
Steve> x = linspace(0.016, 0.017, 20) y = 1000*x+5 +
Steve> randn(len(x))/30.0 p = polyfit(x,y,1) plot(x, y, 'o', x,
Steve> polyval(p, x), 'r') savefig('image.eps')
Steve> The same happens with p[0]*x+p[1] instead of polyval(p, x).
Steve> In the corresponding .png is OK so it seems to be a problem
Steve> with the ps-backend.
This is the same bug that cropped up in your last post -- it is a
truncation bug in backend ps. 1.4g isn't doing it for us... For
testing I jacked up all the 1.4g fmt strings to 1.9g and the line
straightened itself out.
This persistent problem strengthens my belief that the ps backend
should be outputting transformed coords, since we can then precisely
know the size of the rounding error, eg in fractions of a point.
JDH
|