문제

When I use the following comand

p = ggplot(aes(x='DTM',y='TMP1'), data=data)

I get the following error

NameError: name 'aes' is not defined

Could you help me?

도움이 되었습니까?

해결책

You need to import aes:

from ggplot import aes

Alternatively, you can just import everything in the ggplot namespace (though * imports are usually frowned upon as they make it difficult to track down where a name is coming from):

from ggplot import *
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top