【发布时间】:2014-09-21 20:54:42
【问题描述】:
我正在尝试让 PyCharm 显示我的图形,但是当我运行此脚本时,屏幕上什么也没有出现。
from pylab import *
def main():
ion()
t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s)
xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
show()
我正在使用 Python 2.7.6、Pycharm 3.4 和 Windows 7 x64。
D:\Python27\python.exe "D:/sletmig/python tests/pandas/chart.py"
Process finished with exit code 0
我是 Python 新手!
【问题讨论】:
-
你在哪里调用
main函数?