Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have once managed to get plot3d use a colormap, see here:


lists you the colormaps, you can also create your own. Note, the cmsel list in the following snippet defines the actual colors.

var('r v')
cmsel = ['autumn')(_) for _ in sxrange(0,1,0.05)]
p = plot3d(0.2*(r**2 + v**2) + cos(2*r)*sin(2*v),(r,-2,2), (v,-2,2), adaptive=True, color=cmsel, plot_points=10, opacity=0.9)
p2 = sphere((0,0,0),1,color='black',opacity=0.5)
(p+p2).show(aspect_ratio=(1,1,1), figsize=[7,3])