Ask Your Question
1

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

asked 6 years ago

ortollj gravatar image

updated 5 years ago

FrédéricC 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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 6 years ago

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.

Preview: (hide)
link

Comments

1

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

ortollj gravatar imageortollj ( 6 years ago )
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 ( 6 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

1 follower

Stats

Asked: 6 years ago

Seen: 350 times

Last updated: Jan 17 '19