Ask Your Question
1

show all view with same x size of Hanoi's Towers

asked 2019-01-17 13:19:37 -0600

ortollj gravatar image

Hi

I did this little program to visualize all Hanoi's Towers steps in Jupyter Notebook sagemath 8.4 ,W10. why my x-axis is not always the same width size in each view? figsize=[figSizeXmax,figSizeYmax] does not seem to work. how can I manage to get the same x length for each graph ?

Code On Cocalc.com

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2019-01-17 14:04:21 -0600

rburing gravatar image

The figures are all the same size, as you specified with figsize. But what you actually want is to also specify xmin, xmax, ymin and ymax, so that the pictures are also drawn at the same scale.

edit flag offensive delete link more

Comments

1

thank you rburing, it is ok now ! ;-)

ortollj gravatar imageortollj ( 2019-01-17 14:19:52 -0600 )edit
1

what is also important in this post, is also to emphasize the problem of the copies in Python:

from copy import deepcopy

it took me several hours to understand the malfunctions of my Python program. Because of the fact that I did not understand the problems of copy of list, when these lists include sublists !! I wondered even if I did not lose my head so I did not understand what was happening ;-). But after searching the web, the deepcopy() function has saved me a lot of headaches!

ortollj gravatar imageortollj ( 2019-01-31 02:24:31 -0600 )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

1 follower

Stats

Asked: 2019-01-17 13:19:37 -0600

Seen: 32 times

Last updated: Jan 17