On 11/9/10 7:38 AM, Karsten wrote:
One example:
t=var('t')
a=plot(sin(t),t,-pi,pi)
a.save('test.pdf')
a.save('test.png')
In the pdf the function looks "better", since it seems to go through
(0,0) which is not the case in the png.
Ah, yes. Remember how we discussed how horizontal and vertical lines
weren't quite true because they snapped to the pixels? Well, there
aren't pixels in vector graphics like pdf, so no rounding/snapping is
done, and everything is accurate.
It is even more clear to the eye when adding extra thickness to the
plot:
t=var('t')
b=plot(sin(t),t,-pi,pi,thickness=2)
b.save('test1.pdf')
b.save('test1.png')
But then the function seems to be positive in t=-pi and negative in
t=pi because of the way the beginning and end is drawn graphically. So
by keeping thickness to max 1 and saving as pdf the plot is ok.
Just a small question: Is there any reason why the end of the function
is rounded while the beginning is not?
The function is square at both the beginning and end, at least in my
pdf. The function is drawn with capstyle="projecting", which means that
the endpoint of the curve is the center of the final square in the line.
Here is an explanation of the three types of ends ("caps") on a line:
https://developer.mozilla.org/en/SVG/Tutorial/Fill_Stroke_and_Gradients#Stroke
(in that explanation, they call our "projecting" style the "square" style)
Thanks,
Jason
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org