plotting (sin (x))^2 +(cos(x))^2)



On Sat, Dec 12, 2009 at 12:03 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
> Doug Edmunds (gmail) wrote:
>> Strangely, with [y,0,2], the line is bumpy, though with [y,0,1.9] or
>> [y,0,2.1] it is straight. ?I can't seem to reproduce those little bumps
>> with other [y] values.
>>
> Perhaps that is an artifact of wxplot? ?With maxima and the standard
> gnuplot, I see a straight line. ?It seems hard to imagine there would be
> bumps since the variations should be less than 1e-10, which wouldn't
> show up on a plot from 0 to 2, unless your plotting surface was huge.

wxplot2d just set some options for plot2d so that it plots to a png file. Try

plot2d(sin(x)^2+cos(x)^2, [x,-5,5], [y,0,2], [plot_format, png],
[gnuplot_out_file, "image.png"]);

and you will seethat the line is not straight in the png file. I don't
think there is much we can do about that.

Andrej