ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Jan 2019 09:24:31 +0100show all view with same x size of Hanoi's Towershttps://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/
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](https://cocalc.com/projects/9c478dc8-084a-43b6-aedc-e027b42adfa8/files/HanoiTower.ipynb?session=default)Thu, 17 Jan 2019 20:19:37 +0100https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/Answer by rburing for <p>Hi</p>
<p>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 ?</p>
<p><a href="https://cocalc.com/projects/9c478dc8-084a-43b6-aedc-e027b42adfa8/files/HanoiTower.ipynb?session=default">Code On Cocalc.com</a></p>
https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?answer=45085#post-id-45085The 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*.Thu, 17 Jan 2019 21:04:21 +0100https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?answer=45085#post-id-45085Comment by ortollj for <p>The figures are all the same size, as you specified with <code>figsize</code>. But what you actually want is to also specify <code>xmin</code>, <code>xmax</code>, <code>ymin</code> and <code>ymax</code>, so that the pictures are also drawn at the same <em>scale</em>.</p>
https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?comment=45086#post-id-45086thank you rburing, it is ok now ! ;-)Thu, 17 Jan 2019 21:19:52 +0100https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?comment=45086#post-id-45086Comment by ortollj for <p>The figures are all the same size, as you specified with <code>figsize</code>. But what you actually want is to also specify <code>xmin</code>, <code>xmax</code>, <code>ymin</code> and <code>ymax</code>, so that the pictures are also drawn at the same <em>scale</em>.</p>
https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?comment=45240#post-id-45240what 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!Thu, 31 Jan 2019 09:24:31 +0100https://ask.sagemath.org/question/45084/show-all-view-with-same-x-size-of-hanois-towers/?comment=45240#post-id-45240