First time here? Check out the FAQ!

Ask Your Question
1

Scale axis width=1 and height=1

asked 8 years ago

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')
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

tmonteil gravatar image

updated 8 years ago

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)
Preview: (hide)
link

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 ( 8 years ago )

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: 8 years ago

Seen: 555 times

Last updated: May 20 '17