matplotlib plot_surface plot

后端 未结 2 1242
Happy的楠姐
Happy的楠姐 2021-01-28 02:23

The matplotlib tutorial provides a nice example of how to draw a spherical suface:

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import         


        
2条回答
  •  别那么骄傲
    2021-01-28 02:33

    The Equation of a surface is:

      f(x,y,z)=c
    

    where the constants characterize the surfaces. In the case of a circle it is:

    (x^2 + y^2 + z^2)^(1/2) = c
    

    Where c is the radius. each value of gives one surface. In other words, f(x,y,z) can be written as z=g(x,y). Now if you have to span an area with two independent variables x & y, both will have to be 2D arrays. note that both x and y will be 2D arrays and so will z.

提交回复
热议问题