Plotting points on the surface of a sphere in Python's matplotlib

前端 未结 2 660
情话喂你
情话喂你 2021-01-30 14:09

I\'m trying to generate a plot of a sphere, with some points plotted on the surface of the sphere. (Specifically the points are the Lebedev quadrature points) I want my plot to

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 15:10

    Try using the zorder parameter. In the example given below the 3D line plot will be shown on top of the 3D trisurf plot. The reason why zorder goes from 0 to 10 instead of 0 to 1 is given here.

    plt_axes.plot_trisurf(x, y, z, shade=False, color='blue', cmap='Blues', zorder=0)
    plt_axes.plot(x, y, z, marker='.', linestyle='None', label='Label', color='red', zorder=10)
    

提交回复
热议问题