Ask Your Question
1

Scale axis width=1 and height=1

asked 2017-05-19 15:40:06 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello,

I would like to scale the y-axis or the x-axis, so that the grid consists of squares with width=1 and also height=1. Because if i draw elliptic curves, it will deform them. Thank you very much!

Edit: apparently the code is

p3=plot(EllipticCurve([0,0,0,-3.141592654,1.414213562]), color='black', gridlines='true') 
show(p3)
p3.axes_labels(['x','y'])
p3.save('ec1.pdf')
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-19 17:08:18 +0100

tmonteil gravatar image

updated 2017-05-20 08:53:09 +0100

It would be easier to help with your exact code.

When you use the plot function (or method), you can pass the option aspect_ratio=1.

EDIT: in your concrete example, you can do:

sage: p3=plot(EllipticCurve([0,0,0,-3.141592654,1.414213562]), color='black', gridlines='true', aspect_ratio=1)
edit flag offensive delete link more

Comments

Of course,

p3=plot(EllipticCurve([0,0,0,-3.141592654,1.414213562]), color='black', gridlines='true') show(p3) p3.axes_labels(['$x$','$y$']) p3.save('ec1.pdf')

test1234 gravatar imagetest1234 ( 2017-05-19 19:25:47 +0100 )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: 2017-05-19 15:40:06 +0100

Seen: 529 times

Last updated: May 20 '17