Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Combine two 3d plots

It's possible to combine two 2d plots in one:

sum([plot(x^n,(x,0,1),color=rainbow(5)[n], figsize=3) for n in range(5)])

How can this be done for 3d plots? For example, I tried this:

implicit_plot3d(x^2+y^2+z^2==4, (x, -3, 3), (y, -3,3), (z, -3,3)) + implicit_plot3d(x^2+y^2+1.75^2=4, (x, -3, 3), (y, -3, 3), (z, -3, 3))

But it generates this error:

File "<ipython-input-8-6cd08d1c769f>", line 1
SyntaxError: keyword can't be an expression