ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 28 Mar 2012 06:47:20 -0500Mesh not appearing on 3d plothttps://ask.sagemath.org/question/8833/mesh-not-appearing-on-3d-plot/I'm trying to get a mesh to appear on a surface in Sage 4.8 using `parametric_plot3d`. Here is the code:
var('u,v')
f=[u-u^3/3+u*v^2,-v+v^3/3-v*u^2,u^2-v^2]
parametric_plot3d(f,(u,-7,7),(v,-7,7),opacity=0.7,mesh=True)
What am I doing wrong? I also can't get any of the examples from the tutorial page to show a mesh.
Wed, 28 Mar 2012 04:29:26 -0500https://ask.sagemath.org/question/8833/mesh-not-appearing-on-3d-plot/Answer by niles for <p>I'm trying to get a mesh to appear on a surface in Sage 4.8 using <code>parametric_plot3d</code>. Here is the code:</p>
<pre><code>var('u,v')
f=[u-u^3/3+u*v^2,-v+v^3/3-v*u^2,u^2-v^2]
parametric_plot3d(f,(u,-7,7),(v,-7,7),opacity=0.7,mesh=True)
</code></pre>
<p>What am I doing wrong? I also can't get any of the examples from the tutorial page to show a mesh.</p>
https://ask.sagemath.org/question/8833/mesh-not-appearing-on-3d-plot/?answer=13400#post-id-13400This is a known bug; see Trac ticket 9708. As mentioned there, the problem is that the keyword "mesh" isn't getting passed on to `show`. Until it gets fixed, you can use the `show` method explicitly:
var('u,v')
f=[u-u^3/3+u*v^2,-v+v^3/3-v*u^2,u^2-v^2]
parametric_plot3d(f,(u,-7,7),(v,-7,7),opacity=0.7).show(mesh=True)Wed, 28 Mar 2012 06:47:20 -0500https://ask.sagemath.org/question/8833/mesh-not-appearing-on-3d-plot/?answer=13400#post-id-13400