On 1/30/11 5:48 PM, Francois Maltey wrote:
Renato a écrit :
Hello, I can't understand how the ticks option works in plot()... I
want to have no ticks or labels on the axis.
Also, is it possible to show the arrows on the axis? like this:
http://www.homeschoolmath.net/blog/few-complex-numbers.gif
I'm using latest version of sage
Search ticks and axes in plot? and copy/paste the examples :
plot(sin(pi*x), (x, -8, 8), ticks=[[],[]], axes=false)
+ arrow((-8,0),(8,0), color="black")
+ arrow((0,-1),(0,1), color="black")
If you want a grid add a function as
def grid (xmin, xmax, ymin, ymax) :
linesYcst = add (line ([(xmin, k), (xmax, k)]) for k in [ceil (ymin)..
floor(ymax)])
linesXcst = add (line ([(k, ymin), (k, ymax)]) for k in [ceil (xmin)..
floor(xmax)])
return linesXcst+linesYcst
We also have gridlines implemented:
http://sagemath.org/doc/reference/sage/plot/plot.html#sage.plot.plot.Graphics.show
(see the gridline bullet point, or search the examples for "Add grid
lines at the major ticks of the axes." and the few examples following that)
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