Ask Your Question
0

modify axe scale

asked 2013-06-17 03:31:08 -0500

Hello,

I would like to choose which numbers appear on the axes of a graphics. If I do

sage: G = Graphics()
sage: G.set_axes_range(xmin=0,xmax=10,ymin=0,ymax=1)
sage: G.show()

Then the x axis has a small separation each 2 (ie the numbers 0,2,4,6,8,10 appear). What should I do to get it 3 (ie separation at 0,3,6,9) ?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-06-17 03:40:48 -0500

kcrisman gravatar image

You mean like this?

sage: G.show(ticks=3)

There is a lot more information about custom ticks in the plot and graphics documentation.

edit flag offensive delete link more

Comments

Wonderful ! I was not able to find it in the documentation. Many thanks.

vdelecroix gravatar imagevdelecroix ( 2013-06-17 08:51:17 -0500 )edit

Sorry, I am not completely happy... Is this only a method to show ? I would like to use it inside a graphics array (with different ticks on each picture).

vdelecroix gravatar imagevdelecroix ( 2013-06-17 09:19:13 -0500 )edit

Ah, graphics arrays unfortunately don't behave well with respect to different options for each array (yet). http://trac.sagemath.org/sage_trac/ticket/10657 and its friends are the relevant tickets.

kcrisman gravatar imagekcrisman ( 2013-06-17 18:36:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-17 03:31:08 -0500

Seen: 78 times

Last updated: Jun 17 '13