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.Fri, 26 Apr 2024 23:10:04 +0200Size of objects shown in animationshttps://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/Hi,
a series of 3d objects looks OK in the notebook, when shown in a loop
with repeated calls to show().
When the same objects are collected in a list, and given
to animate(), the resulting frames show the objects scaled down
to be almost invisible. I tried to influence animate() with
the figsize keyword, but this is ignored..
So my question is:
How to tell animate() to which size the objects in the list should
be rendered in the animated frames?
Thank you
Example code:
# testcase: stupid 3d plot
f(x,y) = (-((x-1))^2 - ((y-1))^2 - 3 )
def desd():
p = plot([])
p = plot3d(f(x,y), (x,-5,5), (y,-5,5), ymin=-4, ymax=4)
return p
# plot in notebook looks OK
tp = desd()
show(tp, frame=False,aspect_ratio=1,figsize=8)
# test animate
ps = []
for _ in range(6):
ps.append(desd())
an = animate(ps,frame=False,aspect_ratio=1,figsize=8 )
show(an)
# looks distorted and much too small in my setupFri, 26 Apr 2024 13:45:35 +0200https://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/Comment by oGpxkGZURxERhHWg for <p>Hi,
a series of 3d objects looks OK in the notebook, when shown in a loop
with repeated calls to show().
When the same objects are collected in a list, and given
to animate(), the resulting frames show the objects scaled down
to be almost invisible. I tried to influence animate() with
the figsize keyword, but this is ignored..
So my question is:
How to tell animate() to which size the objects in the list should
be rendered in the animated frames?
Thank you</p>
<p>Example code:</p>
<pre><code># testcase: stupid 3d plot
f(x,y) = (-((x-1))^2 - ((y-1))^2 - 3 )
def desd():
p = plot([])
p = plot3d(f(x,y), (x,-5,5), (y,-5,5), ymin=-4, ymax=4)
return p
# plot in notebook looks OK
tp = desd()
show(tp, frame=False,aspect_ratio=1,figsize=8)
# test animate
ps = []
for _ in range(6):
ps.append(desd())
an = animate(ps,frame=False,aspect_ratio=1,figsize=8 )
show(an)
# looks distorted and much too small in my setup
</code></pre>
https://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/?comment=77102#post-id-77102Example code:
# testcase: stupid 3d plot
f(x,y) = (-((x-1))^2 - ((y-1))^2 - 3 )
def desd():
p = plot([])
p = plot3d(f(x,y), (x,-5,5), (y,-5,5), ymin=-4, ymax=4)
return p
# plot in notebook looks OK
tp = desd()
show(tp, frame=False,aspect_ratio=1,figsize=8)
# test animate
ps = []
for _ in range(6):
ps.append(desd())
an = animate(ps,frame=False,aspect_ratio=1,figsize=8 )
show(an)
# looks distorted and much too small in my setupFri, 26 Apr 2024 23:10:04 +0200https://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/?comment=77102#post-id-77102Comment by Max Alekseyev for <p>Hi,
a series of 3d objects looks OK in the notebook, when shown in a loop
with repeated calls to show().
When the same objects are collected in a list, and given
to animate(), the resulting frames show the objects scaled down
to be almost invisible. I tried to influence animate() with
the figsize keyword, but this is ignored..
So my question is:
How to tell animate() to which size the objects in the list should
be rendered in the animated frames?
Thank you</p>
<p>Example code:</p>
<pre><code># testcase: stupid 3d plot
f(x,y) = (-((x-1))^2 - ((y-1))^2 - 3 )
def desd():
p = plot([])
p = plot3d(f(x,y), (x,-5,5), (y,-5,5), ymin=-4, ymax=4)
return p
# plot in notebook looks OK
tp = desd()
show(tp, frame=False,aspect_ratio=1,figsize=8)
# test animate
ps = []
for _ in range(6):
ps.append(desd())
an = animate(ps,frame=False,aspect_ratio=1,figsize=8 )
show(an)
# looks distorted and much too small in my setup
</code></pre>
https://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/?comment=77099#post-id-77099Please provide a code illustrating the issue.Fri, 26 Apr 2024 15:25:18 +0200https://ask.sagemath.org/question/77098/size-of-objects-shown-in-animations/?comment=77099#post-id-77099