메모
전체 예제 코드를 다운로드 하려면 여기 를 클릭 하십시오.
mplot3d 툴킷 #
mplot3d 툴킷을 사용하여 3D 플롯 생성.
이 튜토리얼은 다양한 3D 플롯을 보여줍니다. 그림을 클릭하면 그림을 생성하는 코드가 포함된 전체 갤러리 예제를 볼 수 있습니다.
3D 축(클래스의 )은
키워드 인수를 다음 Axes3D
에 전달하여 생성됩니다 .projection="3d"
Figure.add_subplot
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
2D 서브플롯과 마찬가지로 동일한 그림에 여러 3D 서브플롯을 추가할 수 있습니다.

버전 1.0.0에서 변경: Matplotlib 1.0.0 이전에는 그림당 하나만 Axes3D
만들 수 있었습니다. 로 직접 인스턴스화해야 했습니다 .ax = Axes3D(fig)
버전 3.2.0에서 변경: Matplotlib 3.2.0 이전에는
mpl_toolkits.mplot3d
'3d' 프로젝션을
Figure.add_subplot
.
mplot3d 툴킷에 대한 자세한 내용 은 mplot3d FAQ 를 참조하십시오 .
라인 플롯 #
Axes3D.plot
API 설명서를 참조하십시오 .

산점도 #
Axes3D.scatter
API 설명서를 참조하십시오 .

와이어프레임 플롯 #
Axes3D.plot_wireframe
API 설명서를 참조하십시오 .

표면 플롯 #
Axes3D.plot_surface
API 설명서를 참조하십시오 .

3면 플롯 #
Axes3D.plot_trisurf
API 설명서를 참조하십시오 .

등고선 플롯 #
Axes3D.contour
API 설명서를 참조하십시오 .

채워진 등고선 플롯 #
Axes3D.contourf
API 설명서를 참조하십시오 .

버전 1.1.0의 새로운 기능: 버전 1.1.0 의 버그 수정으로 인해 두 번째 contourf3d 예제에서 데모된 기능이 활성화되었습니다.
다각형 플롯 #
Axes3D.add_collection3d
API 설명서를 참조하십시오 .

막대 그래프 #
Axes3D.bar
API 설명서를 참조하십시오 .

화살통 #
Axes3D.quiver
API 설명서를 참조하십시오 .

3D의 2D 플롯 #

텍스트 #
Axes3D.text
API 설명서를 참조하십시오 .
