Show charts
I am trying to have PyCharm show my graphics, but when I run this script nothing appears on the screen.
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()
I am using Python 2.7.6, Pycharm 3.4 and Windows 7 x64.
---
D:\Python27\python.exe "D:/sletmig/python tests/pandas/chart.py"
Process finished with exit code 0
----
Warning: I am new to Python!
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()
I am using Python 2.7.6, Pycharm 3.4 and Windows 7 x64.
---
D:\Python27\python.exe "D:/sletmig/python tests/pandas/chart.py"
Process finished with exit code 0
----
Warning: I am new to Python!
Please sign in to leave a comment.
and have it not indented. This bit of code only gets run if the file is run on itself, and not if it's imported from something else, as Python doesn't look for a main function like other languages.