AttributeError: module 'matplotlib' has no attribute 'plot'

Sieun·2024년 3월 17일

Python

목록 보기
1/1

'matplotlib'이 'plt'로 잘못 가져와져 'module matplotlib has no attribute plot' 오류가 발생함.

해결책:
'plot' 함수는 Matplotlib의 서브모듈 'pyplot'에 있음. 따라서 올바른 import 문은 다음과 같음:

import matplotlib.pyplot as plt

source: https://docs.kanaries.net/ko/topics/Matplotlib/matplotlib-has-no-attribute-plot

profile
Studying AI/ML with a focus on Multimodal Learning 👩🏻‍💻

0개의 댓글