Introduction
In this blog, I am going to create a simple chart in Python GUI application. It will display a chart on the application screen.
Software requirement
Python 3.5 and IDLE (Python 3.5)
Programming code
-
- from pylab import show, arange,sin,plot,pi
-
- x=arange(0.0,2.0,0.01)
- y=sin(2*pi*x)
- plot(x,y)
-
- show()
About the code
First, I am importing the tkinter modules.
Next, I am assigning the chart x and y values.
Next, displaying the chart in the application using the show() function in the code.
Now, let’s execute the code.
Output