#11500: Problem with accumulating 3D plots over a parameter
------------------------+---------------------------------------------------
Reporter: travis | Owner: jason, mpatel, was
Type: defect | Status: new
Priority: minor | Milestone: sage-4.7.1
Component: notebook | Keywords: plot3d
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
Description changed by travis:
Old description:
> When creating several layers that interpolate between two surfaces, only
> one layer is output when accumulating the layers via a loop. No problem
> if the layers are explicitly coded.
>
> In the looped version, it appears that the plot3d commands are only
> executed at show() time and therefore only use the final value of the
> loop parameter. All of the layers are created on top of each other at
> that final parameter value.
>
> Example worksheet is attached.
New description:
When creating several layers that interpolate between two surfaces, only
one layer is output when accumulating the layers via a loop. No problem
if the layers are explicitly coded.
In the looped version, it appears that the plot3d commands are only
executed at show() time and therefore only use the final value of the loop
parameter. All of the layers are created on top of each other at that
final parameter value.
This works:
P += plot3d(lambda x,y: H(x,y,tiers[2]/10),(x,-1,1),(y,-1,1),opacity=0.2)
P += plot3d(lambda x,y: H(x,y,tiers[5]/10),(x,-1,1),(y,-1,1),opacity=0.2)
P += plot3d(lambda x,y: H(x,y,tiers[8]/10),(x,-1,1),(y,-1,1),opacity=0.2)
show(P)
This does not:
for r in ratios:
P += plot3d(lambda x,y: H(x,y,r),(x,-1,1),(y,-1,1),opacity=0.2) #
layer
show(P)
Example worksheet is attached.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11500#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.