Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The documentation for showing graphics has lots of options. In your case, aspect_ratio=1 will give the same scale, and gridlines and similar options control grid lines.

Actually, because k/x has an asymptote, if you really want the same scale on both axes, you'll probably want to cut off the vertical axis fairly low down. Try this example:

k = 10
plot(k/x,x,0,10,gridlines=True,aspect_ratio=1, ymax=10)

The documentation for showing graphics has lots of options. In your case, aspect_ratio=1 will give the same scale, and gridlines and similar options control grid lines.

Actually, because k/x has an asymptote, if you really want the same scale on both axes, you'll probably want to cut off the vertical axis fairly low down. Try this example:

k = 10
plot(k/x,x,0,10,gridlines=True,aspect_ratio=1, ymax=10)

For even more control of those grid lines, read the documentation for this (search for) [xlist,ylist]: and you can pass in whatever lines you want.

 k = 10
plot(k/x,x,0,10,aspect_ratio=1, ymax=10, gridlines=[range(10),range(10)])

Or you can make the ticks different as well.