Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plot surface plus vector field

My apologies for posting a (hopefully) simple question. I want to plot a surface with the gradient field in the plane underneath. I can create the surface and vector field separately, but I get an error when I try to show them on the same axes. It seems that the vector field is a different type. Does anyone know how to induce the vector field so it can be plotted as part of a 3d plot?

I'd like to do something like this:

f(x,y)=y/(1-x+y)
P=plot3d(f(x,y),(x,0,1),(y,0,1))
gradf=vector[y/(x-y-1)^2,(1-x)/(x-y-1)^2]
VF=plot_vector_field(gradf,(x,0,1),(y,0,1))
show(P+VF)

Everything but that last step works great, and then I get an error message:

NotImplementedError: 3D plotting not implemented for PlotField defined by a 20 x 20 vector grid

Can anyone suggest a workaround? Thanks for your help!

plot surface plus vector field

My apologies for posting a (hopefully) simple question. I want to plot a surface with the gradient field in the plane underneath. I can create the surface and vector field separately, but I get an error when I try to show them on the same axes. It seems that the vector field is a different type. Does anyone know how to induce the vector field so it can be plotted as part of a 3d plot?

I'd like to do something like this:

f(x,y)=y/(1-x+y)
P=plot3d(f(x,y),(x,0,1),(y,0,1))
gradf=vector[y/(x-y-1)^2,(1-x)/(x-y-1)^2]
gradf=vector([y/(x-y-1)^2,(1-x)/(x-y-1)^2])
VF=plot_vector_field(gradf,(x,0,1),(y,0,1))
show(P+VF)

Everything but that last step works great, and then I get an error message:

NotImplementedError: 3D plotting not implemented for PlotField defined by a 20 x 20 vector grid

Can anyone suggest a workaround? Thanks for your help!